Jump to content

Search index_class not finding results


Recommended Posts

Using invision version 4.7.12 and elasticsearch version 7.17.3, search indexing is completed but queries were returning no results.

Upon checking the query sent to ES I see it includes 

"index_class":["IPS\\forums\\Topic\\Post"]

However index_class is indexed as text. Changing this query to use index_class.keyword filter returns results as I would expect.

Presuming that this can't be a bug where the query is using the wrong field since others would have spotted, can you suggest what the root problem might be?

Link to comment
Share on other sites

Yes, the query is made to ES and there are no hits.

e.g. response is

{"took":3,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":0,"relation":"eq"},"max_score":null,"hits":[]}}

 

Edited by NexusMods
Link to comment
Share on other sites

This might be a problem of having configured ES while rebuilding tasks were still going (we're upgrading from v3 to v4).

The ES schema includes mapping:

"index_class": {
  "type": "text",
  "fields": {
    "keyword": {
      "ignore_above": 256,
      "type": "keyword"
    }
  }
}

However if I rebuild the search index on a smaller database the mapping contains:

"index_class": {
  "type": "keyword"
}

Will delete and rebuild the search index since completing the migration background tasks.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...