Jump to content

Featured Replies

Posted

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?

  • Community Expert

Are you seeing anything showing up in your system logs?

  • Author

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

  • Author

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.

  • Author

Yep that works, getting results now that the schema is correct.

I can only suggest to others performing a v4 migration that they only configure ES after completing all the background rebuild tasks.

Thanks for the quick response!

  • Community Expert

No problem. Glad you managed to get things working 🙂 

Recently Browsing 0

  • No registered users viewing this page.