NexusMods Posted October 2, 2023 Posted October 2, 2023 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?
Marc Posted October 2, 2023 Posted October 2, 2023 Are you seeing anything showing up in your system logs?
NexusMods Posted October 2, 2023 Author Posted October 2, 2023 (edited) 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 October 2, 2023 by NexusMods
NexusMods Posted October 2, 2023 Author Posted October 2, 2023 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.
Marc Posted October 2, 2023 Posted October 2, 2023 try that first of all, and then let us know if you are still seeing issues NexusMods 1
NexusMods Posted October 2, 2023 Author Posted October 2, 2023 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!
Marc Posted October 2, 2023 Posted October 2, 2023 No problem. Glad you managed to get things working 🙂Â
Recommended Posts