Search query working in One environment and not in another

Dear team,

Not really sure what you mean here.

Dear @Igor_Motov,

Sorry, I was writing two topics, and i did a mistake in the title.

The problem is that this query is working in on environment and not in another.

Which query, what do you mean by "not working"?

Hi @Igor_Motov,
Thank you for the help!

This one:

curl -XGET 'http://localhost:9200/_search?pretty' -d'{
  "from" : 0,
  "size" : 6,
  "query" : {
    "filtered" : {
      "query" : {
        "bool" : {
          "must" : [ {
            "bool" : {
              "must" : {
                "multi_match" : {
                  "query" : "EN",
                  "fields" : [ "proceedingslanguage_*", "proceedingslanguage_en^5.0" ],
                  "type" : "best_fields"
                }
              }
            }
          } ]
        }
      },
      "filter" : {
        "type" : {
          "value" : "decision"
        }
      }
    }
  }
}'

What do you mean by "not working"?

It's not giving any hits(the number of hits is 0).

Thanks !

How does the document that you expect it to return look like and what is the mapping?

Dear @Igor_Motov,

Thank you for the help, please find it in dg_creation.txt by following this link

Dear @Igor_Motov,
Can you please help me in this topic as it is more urgent and i'm blocked in it?

Many thanks!

Best regards,
Mohammed ESSABRI

Please don't ping people who are not yet involved in a given topic.

1 Like

OK,
I am sorry.

Thank you!

1 Like

@mohammedEssabri you ignored the first part of my question "How does the document that you expect it to return look like?"

Sorry,
I look like following ( This is a hit ):

{
      "_index" : "dg3_v11",
      "_type" : "decision",
      "_id" : "dg3decisions/name.xml",
      "_score" : 1.0,
      "_source":{
      "path":"dg3decisions/name.xml",
      "decision_content":"...........content text...........\n",
      "DIS":"D",
      "KEY":"\nsome text\n",
      "DDO":"20040503",
      "title":["t010011eu1","t010011","t0011/01","t 0011/01","t11/01","t 11/01"],
      "APN":"95907427.9",
      "ART":"EPC1973 Art 111",
      "APL":"\nsome text.\n",
      "CSN":["t010011","T0011/01","t_0011/01","t11/01","t 11/01"],
      "ORD":"\nORDER\n.... some text",
      "TLE":" some text",
      "DAT":"20040427",
      "BOA":"3.4.02"
      }
    }

Thanks !

You are searching for the fields proceedingslanguage_* but you don't have these fields in ether the document that you expect to find nor in the mapping that you have provided. The closest field that I see there is proceedingslanguage.

I absolutely agree with you, but the question is why the same code ( using the same query, same mapping, similar data) is working in other environments?

Thanks!

My best guess is the other environment doesn't have the same mapping, data is not similar enough or query is different.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.