XF 2.3 Elasticsearch error: Query contains too many nested clauses

MentaL

Well-known member
  • XFES\Elasticsearch\RequestException: Elasticsearch error: Query contains too many nested clauses; maxClauseCount is set to 1337
  • src/addons/XFES/Elasticsearch/Api.php:466
  • Generated by: xxx
  • Sep 9, 2024 at 1:43 PM

Stack trace​

#0 src/addons/XFES/Elasticsearch/Api.php(393): XFES\Elasticsearch\Api->request('get', 'searchzone/_sea...', '{
"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(334): XFES\Search\Source\Elasticsearch->executeSearch(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), Array, 8)
#5 src/addons/XFES/Search/Source/Elasticsearch.php(237): SV\SearchImprovements\XFES\Search\Source\Elasticsearch->executeSearch(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), Array, 8)
#6 src/XF/Search/Search.php(260): XFES\Search\Source\Elasticsearch->autoComplete(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), 8)
#7 src/XF/Search/Search.php(366): XF\Search\Search->XF\Search\{closure}(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), 8)
#8 src/XF/Search/Search.php(255): XF\Search\Search->executeSearch(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), 8, Object(Closure), true)
#9 src/XF/Pub/Controller/SearchController.php(117): XF\Search\Search->autoComplete(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), 8)
#10 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\SearchController->actionAutoComplete(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'AutoComplete', Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\SearchPatchFirst), NULL)
#12 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\SearchPatchFirst), NULL)
#13 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#15 src/XF.php(806): XF\App->run()
#16 index.php(23): XF::runApp('XF\\Pub\\App')
#17 {main}

Request state​

array(4) {
["url"] => string(21) "/search/auto-complete"
["referrer"] => string(75) "https://forum.xxx.com/search/448503/?page=3&q=class0.classconst&o=date"
["_GET"] => array(0) {
}
["_POST"] => array(6) {
["keywords"] => string(1155) "fWALKVELO : walk speed fRUNVELO : run speed fHP_STR : How much HP per Vit point you get fMP_SPI : How much MP per Int you get fSP_STA : How much SP per stm you get fHIT_DEX : hit rate per dex fAVOID_DEX : avoid per dex fDEFENSE_DEX : def per dex fPA_POW : melee (close fighting value [affects your ATK]) points per Pow fPA_DEX : melee points per dex fSA_POW : missle (range fighting value [affects your ATK]) points per pow fSA_DEX : missle points per dex fMA_DEX : energy points per dex fMA_SPI : energy points per int fMA_INT : energy points per "int" (its a stat point that you can't add, it was left out when they made the game) fCONV_AP : sorry don't know what this is fCONV_DP : sorry don't know what this is fCONV_PA : atk per melee point fCONV_SA : atk per missile point wBEGIN_AP : AP you have when you make char (don't know what is AP) wBEGIN_DP : DP you have when you make char (don't know what DP is) wBEGIN_PA : melee value you have when make char wBEGIN_SA : missile value you have when make char fLVLUP_AP : AP gained per lv up fLVLUP_DP : DP gained per lv up fLVLUP_PA : melee gained per lv up fLVLUP_SA : missile gained per lv up"
["c"] => array(1) {
["users"] => string(0) ""
}
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
["_xfWithData"] => string(1) "1"
["_xfRequestUri"] => string(49) "/search/448503/?page=3&q=class0.classconst&o=date"
}
}

I assume it's because of the long tail keyword used. Maybe auto-complete should have an input limit?
 
Related:


You can trigger this by entering a lot of keywords in the search input (as seen in your request state), but that should be fairly unusual.
 
Back
Top Bottom