XF 2.3 Search won't work after upgrade to 2.3

JamesBrown

Well-known member
Errors every time, I've reindexed,

This is my Elasticseacrh info

1728031514517.webp

Any ideas? Thanks
  • XFES\Elasticsearch\RequestException: Elasticsearch error: unknown query [type] DSL:{"sort":["_score",{"date":"desc"}],"docvalue_fields":[{"field":"discussion_id"},{"field":"user"},{"field":"date"}],"_source":false,"size":600,"query":{"bool":{"filter":[{"bool":{"should":[{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"cas_ad"}},{"type":{"value":"cas_comment"}},{"type":{"value":"cas_item"}},{"type":{"value":"cas_question"}},{"type":{"value":"cas_question_reply"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"cas_feedback"}},{"type":{"value":"cas_feedback_reply"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"term":{"active_recipients":1}},{"bool":{"should":[{"type":{"value":"conversation"}},{"type":{"value":"conversation_message"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"type":{"value":"discussion"}}]}},{"bool":{"filter":[{"type":{"value":"group"}}]}},{"bool":{"filter":[{"type":{"value":"nf_calendar_event"}}]}},{"bool":{"filter":[{"type":{"value":"page"}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"post"}},{"type":{"value":"thread"}}],"minimum_should_match":1}}],"must_not":[{"terms":{"node":[142,197,204]}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"profile_post"}},{"type":{"value":"profile_post_comment"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"resource"}},{"type":{"value":"resource_update"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"rms_item"}},{"type":{"value":"rms_question"}},{"type":{"value":"rms_question_reply"}},{"type":{"value":"rms_review"}},{"type":{"value":"rms_review_reply"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"sc_item"}},{"type":{"value":"sc_comment"}},{"type":{"value":"sc_page"}},{"type":{"value":"sc_rating"}},{"type":{"value":"sc_rating_reply"}},{"type":{"value":"sc_series"}},{"type":{"value":"sc_update"}},{"type":{"value":"sc_update_reply"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"ubs_blog"}},{"type":{"value":"ubs_blog_page"}},{"type":{"value":"ubs_blog_entry"}},{"type":{"value":"ubs_comment"}},{"type":{"value":"ubs_page"}},{"type":{"value":"ubs_rating"}},{"type":{"value":"ubs_series"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"type":{"value":"xfmg_album"}}]}},{"bool":{"filter":[{"type":{"value":"xfmg_comment"}}]}},{"bool":{"filter":[{"type":{"value":"xfmg_media"}}]}}],"minimum_should_match":1}}],"must":[{"function_score":{"query":{"simple_query_string":{"query":"swift","fields":["title","message","title.exact^1.5"],"default_operator":"and","quote_field_suffix":".exact"}},"functions":[{"exp":{"date":{"origin":1728009782,"decay":0.5,"scale":8640000}}}],"score_mode":"sum"}}]}}}
  • src/addons/XFES/Elasticsearch/Api.php:466

Stack trace​

#0 src/addons/XFES/Elasticsearch/Api.php(393): XFES\Elasticsearch\Api->request('get', 'mydatabase/_searc...', '{
"sort": [...')
#1 src/addons/XFES/Elasticsearch/Api.php(291): XFES\Elasticsearch\Api->requestFromIndex('get', '_search', Array)
#2 src/addons/SV/SearchImprovements/XFES/Elasticsearch/Api.php(56): XFES\Elasticsearch\Api->search(Array)
#3 src/addons/XFES/Search/Source/Elasticsearch.php(861): SV\SearchImprovements\XFES\Elasticsearch\Api->search(Array)
#4 src/addons/SV/SearchImprovements/XFES/Search/Source/Elasticsearch.php(300): XFES\Search\Source\Elasticsearch->executeSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, '600')
#5 src/addons/XFES/Search/Source/Elasticsearch.php(157): SV\SearchImprovements\XFES\Search\Source\Elasticsearch->executeSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, '600')
#6 src/XF/Search/Search.php(337): XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), '600')
#7 src/XF/Search/Search.php(366): XF\Search\Search->XF\Search\{closure}(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), '600')
#8 src/addons/SV/ElasticSearchEssentials/XF/Search/Search.php(48): XF\Search\Search->executeSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), '600', Object(Closure), true)
#9 src/XF/Search/Search.php(332): SV\ElasticSearchEssentials\XF\Search\Search->executeSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), NULL, Object(Closure), true)
#10 src/XF/Repository/SearchRepository.php(37): XF\Search\Search->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery))
#11 src/addons/SV/ElasticSearchEssentials/XF/Repository/XF22/SearchPatch.php(35): XF\Repository\SearchRepository->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#12 src/addons/SV/ElasticSearchEssentials/Repository/SearchTrait.php(41): SV\ElasticSearchEssentials\XF\Repository\XF22\SearchPatch->SV\ElasticSearchEssentials\XF\Repository\XF22\{closure}(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#13 src/addons/SV/ElasticSearchEssentials/XF/Repository/XF22/SearchPatch.php(34): SV\ElasticSearchEssentials\XF\Repository\XF22\SearchPatch->wrapRunSearchForSvEss(Object(Closure), Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#14 src/addons/SV/SearchImprovements/XF/Repository/Search.php(101): SV\ElasticSearchEssentials\XF\Repository\XF22\SearchPatch->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#15 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/XF22/SearchPatch.php(26): SV\SearchImprovements\XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#16 src/XF/Pub/Controller/SearchController.php(182): SV\ElasticSearchEssentials\XF\Pub\Controller\XF22\SearchPatch->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array)
#17 src/addons/SV/SearchImprovements/XF/Pub/Controller/Search.php(86): XF\Pub\Controller\SearchController->actionSearch()
#18 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/Search.php(522): SV\SearchImprovements\XF\Pub\Controller\Search->actionSearch()
#19 src/XF/Mvc/Dispatcher.php(362): SV\ElasticSearchEssentials\XF\Pub\Controller\Search->actionSearch(Object(XF\Mvc\ParameterBag))
#20 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'Search', Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\SearchPatchFirst), NULL)
#21 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\SearchPatchFirst), NULL)
#22 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#23 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#24 src/XF.php(806): XF\App->run()
#25 index.php(23): XF::runApp('XF\\Pub\\App')
#26 {main}
 

This will remove the shard output issue, but not fix the underlying cause. I Just dislike seeing 1 active and 1 unassigned shard shown. Have you updated the addon for 2.3 support as well?
 
Errors every time, I've reindexed,

This is my Elasticseacrh info

View attachment 312009

Any ideas? Thanks
  • XFES\Elasticsearch\RequestException: Elasticsearch error: unknown query [type] DSL:{"sort":["_score",{"date":"desc"}],"docvalue_fields":[{"field":"discussion_id"},{"field":"user"},{"field":"date"}],"_source":false,"size":600,"query":{"bool":{"filter":[{"bool":{"should":[{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"cas_ad"}},{"type":{"value":"cas_comment"}},{"type":{"value":"cas_item"}},{"type":{"value":"cas_question"}},{"type":{"value":"cas_question_reply"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"cas_feedback"}},{"type":{"value":"cas_feedback_reply"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"term":{"active_recipients":1}},{"bool":{"should":[{"type":{"value":"conversation"}},{"type":{"value":"conversation_message"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"type":{"value":"discussion"}}]}},{"bool":{"filter":[{"type":{"value":"group"}}]}},{"bool":{"filter":[{"type":{"value":"nf_calendar_event"}}]}},{"bool":{"filter":[{"type":{"value":"page"}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"post"}},{"type":{"value":"thread"}}],"minimum_should_match":1}}],"must_not":[{"terms":{"node":[142,197,204]}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"profile_post"}},{"type":{"value":"profile_post_comment"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"resource"}},{"type":{"value":"resource_update"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"rms_item"}},{"type":{"value":"rms_question"}},{"type":{"value":"rms_question_reply"}},{"type":{"value":"rms_review"}},{"type":{"value":"rms_review_reply"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"sc_item"}},{"type":{"value":"sc_comment"}},{"type":{"value":"sc_page"}},{"type":{"value":"sc_rating"}},{"type":{"value":"sc_rating_reply"}},{"type":{"value":"sc_series"}},{"type":{"value":"sc_update"}},{"type":{"value":"sc_update_reply"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"bool":{"should":[{"type":{"value":"ubs_blog"}},{"type":{"value":"ubs_blog_page"}},{"type":{"value":"ubs_blog_entry"}},{"type":{"value":"ubs_comment"}},{"type":{"value":"ubs_page"}},{"type":{"value":"ubs_rating"}},{"type":{"value":"ubs_series"}}],"minimum_should_match":1}}]}},{"bool":{"filter":[{"type":{"value":"xfmg_album"}}]}},{"bool":{"filter":[{"type":{"value":"xfmg_comment"}}]}},{"bool":{"filter":[{"type":{"value":"xfmg_media"}}]}}],"minimum_should_match":1}}],"must":[{"function_score":{"query":{"simple_query_string":{"query":"swift","fields":["title","message","title.exact^1.5"],"default_operator":"and","quote_field_suffix":".exact"}},"functions":[{"exp":{"date":{"origin":1728009782,"decay":0.5,"scale":8640000}}}],"score_mode":"sum"}}]}}}
  • src/addons/XFES/Elasticsearch/Api.php:466

Stack trace​

#0 src/addons/XFES/Elasticsearch/Api.php(393): XFES\Elasticsearch\Api->request('get', 'mydatabase/_searc...', '{
"sort": [...')
#1 src/addons/XFES/Elasticsearch/Api.php(291): XFES\Elasticsearch\Api->requestFromIndex('get', '_search', Array)
#2 src/addons/SV/SearchImprovements/XFES/Elasticsearch/Api.php(56): XFES\Elasticsearch\Api->search(Array)
#3 src/addons/XFES/Search/Source/Elasticsearch.php(861): SV\SearchImprovements\XFES\Elasticsearch\Api->search(Array)
#4 src/addons/SV/SearchImprovements/XFES/Search/Source/Elasticsearch.php(300): XFES\Search\Source\Elasticsearch->executeSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, '600')
#5 src/addons/XFES/Search/Source/Elasticsearch.php(157): SV\SearchImprovements\XFES\Search\Source\Elasticsearch->executeSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, '600')
#6 src/XF/Search/Search.php(337): XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), '600')
#7 src/XF/Search/Search.php(366): XF\Search\Search->XF\Search\{closure}(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), '600')
#8 src/addons/SV/ElasticSearchEssentials/XF/Search/Search.php(48): XF\Search\Search->executeSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), '600', Object(Closure), true)
#9 src/XF/Search/Search.php(332): SV\ElasticSearchEssentials\XF\Search\Search->executeSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), NULL, Object(Closure), true)
#10 src/XF/Repository/SearchRepository.php(37): XF\Search\Search->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery))
#11 src/addons/SV/ElasticSearchEssentials/XF/Repository/XF22/SearchPatch.php(35): XF\Repository\SearchRepository->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#12 src/addons/SV/ElasticSearchEssentials/Repository/SearchTrait.php(41): SV\ElasticSearchEssentials\XF\Repository\XF22\SearchPatch->SV\ElasticSearchEssentials\XF\Repository\XF22\{closure}(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#13 src/addons/SV/ElasticSearchEssentials/XF/Repository/XF22/SearchPatch.php(34): SV\ElasticSearchEssentials\XF\Repository\XF22\SearchPatch->wrapRunSearchForSvEss(Object(Closure), Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#14 src/addons/SV/SearchImprovements/XF/Repository/Search.php(101): SV\ElasticSearchEssentials\XF\Repository\XF22\SearchPatch->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#15 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/XF22/SearchPatch.php(26): SV\SearchImprovements\XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#16 src/XF/Pub/Controller/SearchController.php(182): SV\ElasticSearchEssentials\XF\Pub\Controller\XF22\SearchPatch->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array)
#17 src/addons/SV/SearchImprovements/XF/Pub/Controller/Search.php(86): XF\Pub\Controller\SearchController->actionSearch()
#18 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/Search.php(522): SV\SearchImprovements\XF\Pub\Controller\Search->actionSearch()
#19 src/XF/Mvc/Dispatcher.php(362): SV\ElasticSearchEssentials\XF\Pub\Controller\Search->actionSearch(Object(XF\Mvc\ParameterBag))
#20 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'Search', Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\SearchPatchFirst), NULL)
#21 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\SearchPatchFirst), NULL)
#22 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#23 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#24 src/XF.php(806): XF\App->run()
#25 index.php(23): XF::runApp('XF\\Pub\\App')
#26 {main}

Yes, we are using 2.3.3

We are also having a lot of double and triple posts issues, I don't know if this is related
The yellow shards are a by-product of not having a redundant server and are ok.
You have the Elastic Search Essentials addon installed. It is not yet XF 2.3 ready. Disable the addon.

See this overview:
 
Last edited:
Solution
You have Elastic Search Essentials addon installed. It is not yet XF 2.3 ready. Disable the addon.

See this overview:


Thanks, that was it, and it looks like that was the cause of the double/triple posting too as that seems to have stopped. Thanks.
 
Back
Top Bottom