0

I have a simple_query_string query with multiple fields, each field has different boost values. However, if there is a match of a query in any of the fields with less or no boost value the query returns no result. Is it a known issue or am I doing something wrong?

The phrase 'Peace for Change' is there in the title field only but the query returns no result.

Here's my query:

{ 
  "query": {
    "bool": {
      "must": [
        {
          "simple_query_string": {
            "query": "Peace for Change",
            "default_operator": "AND",
            "flags": "PREFIX|PHRASE|NOT|AND|OR|FUZZY|WHITESPACE",
            "fields": [
              "*",
              "systemNumber^5",
              "global_search",
              "objectType^2",
              "partTypes.text",
              "partTypes.id",
              "people^2",
              "person^2",
              "org^2",
              "title^2",
              "Location.displayName",
              "briefDescription",
              "physicalDescription",
              "summaryDescription",
              "flatPersonsNameId",
              "flatPeoplesNameId",
              "flatOrganisationsNameId",
              "primaryDate",
              "primaryDateEarliest",
              "primaryDateLatest"
            ]
          }
        }
      ]
    }
  }
}```


4
  • is there any analyzer in the title field? Could you provide the document with text Peace for Change? Commented Jan 3, 2023 at 12:21
  • Yes, there is a standard analyzer with the title field. Sorry I can't provide you with the exact document but here's a similar document api.vam.ac.uk/v2/museumobject/O696516 If I search for the title with the same query, it doesn't return results, although the phrase is the exact title, however it isn't there in any of the other fields. Commented Jan 3, 2023 at 12:59
  • I did a example with your query and get the results. POST idx_test/_doc { "title":"Peace for Change" } And I used your query. Commented Jan 3, 2023 at 14:01
  • Mine isn't working. Commented Jan 3, 2023 at 15:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.