Field names in Query String syntax doesn't filter this search

Dear Elasticsearch team,

I'm using Elasticsearch 1.7.
Following this link,
The two following queries must give the same result, but it's not the case.

The first one gives expected result, but we created the second one to let search more convenient for user by letting him to write search by filters in one field ( which is faster then filling each field apart).
But the second one doesn't use this filter at all.

The first one:

{
"query" : {
          "bool" : {
            "must" : [ {
              "query_string" : {
                "default_field" : "main_search_field_*"
              }
            }, {
              "bool" : {
                "must" : {
                  "query_string" : {
                    "query" : "PCT",
                    "fields" : [ "TLE_*" ]
                  }
                }
              }
            } ]
          }
        }
}

The second one:

{
 "bool" : {
     must" : [ {
         "query_string" : {
                "query" : "\"TLE_\\*:\"PCT\"\"",
                "default_field" : "main_search_field_*"
           }
     } ]
  }
}

Can some one help please?
Thank you in advance.

Dear all,

Can someone help me please?
Thank you!

Read this and specifically the "Also be patient" part.

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

1 Like

Can you share a full reproduction script for 6.3 version?

That might have been fixed and anyway, as 1.7 is not maintained anymore, I don't think anyone will try to restart an old server like this to help.

So you will earn time by reproducing the problem on 6.3 IMHO.

1 Like

Dear @dadoonet,

Thank you for the advice!
I'm sorry for that, I replied myself to let it visible as I'm pressed to find a solution.

Regarding your feedback about the problem, thank you for trying to help me,
The problem was in query string which was surrounded by quotes ""TLE_\*:"PCT""", that prevents Elasticsearch from interpreting it.

Thank you and best regards,

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