Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 2, 20231 yr 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?
October 2, 20231 yr 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 October 2, 20231 yr by NexusMods
October 2, 20231 yr 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.
October 2, 20231 yr Community Expert try that first of all, and then let us know if you are still seeing issues
October 2, 20231 yr 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!