Community for yuuvis® RAD

0 votes
by (2k points)
edited by

Dear OS,

we get different results when we use the searchservice via gateway vs. searchservice via eureka https://dms/search/search)

searchservice via gateway: Gefunde Objekte: 83
searchservice via dms: Gefundene Objekte: 1818

Our POST Request body:

{
"types": [
    "anspruchsgrundlage"

]}

We set the logging.level.QUERY: DEBUG and found out that the search service fires a different query.

Searchservice via gateway fires correct Query: (only searching for one key_type)

{"from":0,
   "size":100,
   "query":{
      "function_score":{
         "query":{
            "bool":{
               "filter":[
                  {
                     "terms":{
                        "bke_acl":[
                           "DC8C5380F3024F72BF688116164F364E"
                        ],
                        "boost":0.3
                     }
                  },
                  {
                     "terms":{
                        "key_type":[
                           "anspruchsgrundlage"
                        ],
                        "boost":1.0
                     }
                  }
               ],
               "adjust_pure_negative":true,
               "boost":1.0
            }
         },
         "functions":[
            {
               "filter":{
                  "match_all":{
                     "boost":1.0
                  }
               },
               "weight":4.0,
               "exp":{
                  "dte_modified":{
                     "origin":"now",
                     "scale":"30d",
                     "decay":0.5
                  },
                  "multi_value_mode":"MIN"
               }
            },
            {
               "filter":{
                  "match_all":{
                     "boost":1.0
                  }
               },
               "field_value_factor":{
                  "field":"num_version",
                  "factor":0.5,
                  "missing":1.0,
                  "modifier":"log1p"
               }
            }
         ],
         "score_mode":"multiply",
         "max_boost":3.4028235E38,
         "boost":1.0
      }
   },
   "_source":{
      "includes":[
         "str_anspruchsgrundlage_anspruchsgrundlagenid"
      ],
      "excludes":[

      ]
   },
   "track_total_hits":2147483647
}

Searchservice via eureka fires wrong Query: (he is searching for all key_types)

{
   "from":0,
   "size":100,
   "query":{
      "function_score":{
         "query":{
            "bool":{
               "filter":[
                  {
                     "terms":{
                        "bke_acl":[
                           "DC8C5380F3024F72BF688116164F364E",
                        ],
                        "boost":0.3
                     }
                  },
                  {
                     "terms":{
                        "key_type":[
                           "rueckschein",
                           "rueckerstattungsgutschrift",
                           "errorlog",
                           "schadensersatzvorlage",
                           "faktura",
                           "storno",
                           "freiezahlungsaufforderung",
                           "zahlungsaufforderung",
                           "rueckerstattungsstorno",
                           "freiesstorno",
                           "auskunftsanforderung",
                           "correspondence",
                           "mahnung",
                           "quotenausgleich",
                           "ratenzahlung",
                           "rechercheunterlagen",
                           "registerauszug",
                           "sonstiges",
                           "telefonnotiz",
                           "vvv",
                           "haendlermeldung",
                           "importmeldung",
                           "anspruchsgrundlage",
                           "gesamtvertragsunterlagen",
                           "pflichtenuebernahme",
                           "rueckerstattungsantrag",
                           "rueckerstattungsauskunft",
                           "testat",
                           "ausbuchung",
                           "gesamtvertragsmitgliedschaft",
                           "haendlerauskunft",
                           "fakturierbareauskunft",
                           "gesamtvertrag",
                           "tempobjekt",
                           "sapbenutzerliste",
                           "rueckerstattungsstornovorlage",
                           "tarif",
                           "schadensersatzstornovorlage",
                           "sysemail",
                           "datenuebernahme",
                           "banken",
                           "issue",
                           "zahlungsaufforderungvorlage",
                           "freiezahlungsaufforderungvorlage",
                           "freiesgutschriftsstornovorlage",
                           "rechnungvorlage",
                           "verband",
                           "freiegutschriftvorlage",
                           "admintest",
                           "kundenadresse",
                           "zahlungsaufforderungsstornovorlage",
                           "freieszahlungsaufforderungsstornovorlage",
                           "rueckerstattungsgutschriftvorlage",
                           "anspruchgenerierung",
                           "verbandsadresse",
                           "tempakte",
                           "sysdmscontenttemplate",
                           "product",
                           "fakturafreigabestufen",
                           "rechnungsstornovorlage",
                           "anspruch",
                           "steuerkonfiguration",
                           "artikel",
                           "customer"
                        ],
                        "boost":1.0
                     }
                  }
               ],
               "adjust_pure_negative":true,
               "boost":1.0
            }
         },
         "functions":[
            {
               "filter":{
                  "match_all":{
                     "boost":1.0
                  }
               },
               "weight":4.0,
               "exp":{
                  "dte_modified":{
                     "origin":"now",
                     "scale":"30d",
                     "decay":0.5
                  },
                  "multi_value_mode":"MIN"
               }
            },
            {
               "filter":{
                  "match_all":{
                     "boost":1.0
                  }
               },
               "field_value_factor":{
                  "field":"num_version",
                  "factor":0.5,
                  "missing":1.0,
                  "modifier":"log1p"
               }
            }
         ],
         "score_mode":"multiply",
         "max_boost":3.4028235E38,
         "boost":1.0
      }
   },
   "_source":{
      "includes":[
         "key_type",
         "key_title_de",
         "key_description_de",
         "key_mimetypegroup",
         "key_mimetype",
         "str_filename",
         "num_filesize",
         "dte_created",
         "key_creatortitle",
         "dte_modified",
         "key_modifiertitle"
      ],
      "excludes":[

      ]
   },
   "track_total_hits":2147483647
}

Beim searchservice via gateway werden die query parameter richtig gesetzt.

Beim searchservice via dms werden die query parameter nicht gesetzt, deswegen findet er wsl mehr.

1 Answer

+1 vote
by (2k points)
edited by

The problem only occures, when we use FeignClient.
When we use RestTemplate with http://dms/search/search it works fine.
It seems FeignClient won't send the RequestBody correctly.

We suppose it's because of the ObjectMapper of FeignClient. So no further help needed. If we can fix it, I will post it here for future reference.

Related questions

...