No query registered for [match_none]

mattrogowski

Well-known member
Tried searching but ironically there were no matches 🥁 ...

Anyway, as of earlier today I've been seeing these errors logged by the hourly similar threads rebuild:

Code:
XFES\Elasticsearch\RequestException: Elasticsearch error: No query registered for [match_none] src/addons/XFES/Elasticsearch/Api.php:410

Code:
#0 src/addons/XFES/Elasticsearch/Api.php(331): XFES\Elasticsearch\Api->request('get', 'db_name/_se...', '{
    "sort": [...')
#1 src/addons/XFES/Elasticsearch/Api.php(234): XFES\Elasticsearch\Api->requestFromIndex('get', '_search', Array)
#2 src/addons/XFES/Search/Source/Elasticsearch.php(748): XFES\Elasticsearch\Api->search(Array)
#3 src/addons/XFES/Search/Source/Elasticsearch.php(227): XFES\Search\Source\Elasticsearch->executeSearch(Object(XFES\Search\Query\MoreLikeThisQuery), Array, 100)
#4 src/addons/XFES/XF/Search/Search.php(36): XFES\Search\Source\Elasticsearch->moreLikeThis(Object(XFES\Search\Query\MoreLikeThisQuery), 100)
#5 src/XF/Search/Search.php(212): XFES\XF\Search\Search->XFES\XF\Search\{closure}(Object(XFES\Search\Query\MoreLikeThisQuery), 100)
#6 src/addons/XFES/XF/Search/Search.php(32): XF\Search\Search->executeSearch(Object(XFES\Search\Query\MoreLikeThisQuery), 100, Object(Closure), false)
#7 src/addons/XFES/XF/Repository/Thread.php(87): XFES\XF\Search\Search->moreLikeThis(Object(XFES\Search\Query\MoreLikeThisQuery), 100, false)
#8 src/addons/XFES/XF/Repository/Thread.php(52): XFES\XF\Repository\Thread->getSimilarThreadIds(Object(SV\ReportImprovements\XF\Entity\Thread), 100, false)
#9 src/addons/XFES/Job/SimilarThreads.php(64): XFES\XF\Repository\Thread->rebuildSimilarThreadsCache(Object(SV\ReportImprovements\XF\Entity\Thread))
#10 src/XF/Job/AbstractRebuildJob.php(47): XFES\Job\SimilarThreads->rebuildById(5310431)
#11 src/addons/XFES/Job/SimilarThreads.php(23): XF\Job\AbstractRebuildJob->run(60)
#12 src/XF/Job/Manager.php(258): XFES\Job\SimilarThreads->run(60)
#13 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, 60)
#14 src/XF/Job/Manager.php(84): XF\Job\Manager->runJobEntry(Array, 60)
#15 job.php(43): XF\Job\Manager->runQueue(false, 60)
#16 {main}

Code:
Similar thread cache rebuild failure: The search could not be completed. Please try again later. src/XF.php:787

Code:
#0 src/addons/XFES/Search/Source/Elasticsearch.php(759): XF::phrasedException('xfes_search_cou...')
#1 src/addons/XFES/Search/Source/Elasticsearch.php(227): XFES\Search\Source\Elasticsearch->executeSearch(Object(XFES\Search\Query\MoreLikeThisQuery), Array, 100)
#2 src/addons/XFES/XF/Search/Search.php(36): XFES\Search\Source\Elasticsearch->moreLikeThis(Object(XFES\Search\Query\MoreLikeThisQuery), 100)
#3 src/XF/Search/Search.php(212): XFES\XF\Search\Search->XFES\XF\Search\{closure}(Object(XFES\Search\Query\MoreLikeThisQuery), 100)
#4 src/addons/XFES/XF/Search/Search.php(32): XF\Search\Search->executeSearch(Object(XFES\Search\Query\MoreLikeThisQuery), 100, Object(Closure), false)
#5 src/addons/XFES/XF/Repository/Thread.php(87): XFES\XF\Search\Search->moreLikeThis(Object(XFES\Search\Query\MoreLikeThisQuery), 100, false)
#6 src/addons/XFES/XF/Repository/Thread.php(52): XFES\XF\Repository\Thread->getSimilarThreadIds(Object(SV\ReportImprovements\XF\Entity\Thread), 100, false)
#7 src/addons/XFES/Job/SimilarThreads.php(64): XFES\XF\Repository\Thread->rebuildSimilarThreadsCache(Object(SV\ReportImprovements\XF\Entity\Thread))
#8 src/XF/Job/AbstractRebuildJob.php(47): XFES\Job\SimilarThreads->rebuildById(5310431)
#9 src/addons/XFES/Job/SimilarThreads.php(23): XF\Job\AbstractRebuildJob->run(60)
#10 src/XF/Job/Manager.php(258): XFES\Job\SimilarThreads->run(60)
#11 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, 60)
#12 src/XF/Job/Manager.php(84): XF\Job\Manager->runJobEntry(Array, 60)
#13 job.php(43): XF\Job\Manager->runQueue(false, 60)
#14 {main}

They've been logged in tandem seemingly for no obvious reason for the past several hours.

XF 2.2.6, XFES 2.2.1, ElasticSearch 2.4.2.

Nothing has knowingly changed, but hosting have said "match_none was not introduced until ES 5.x" - only reference I can see to it is inside XFES\Search\Source\Elasticsearch::getMLTSearchQueryDsl but these versions have been running without issue for some time now, so I have to assume it's something with the ES instance itself.

Any suggestions on what to look into here? Even a direct match Google search has no results for the exception message so a bit stumped.
 
Last edited:
Solution
I think this would imply the rebuild was enqueued for a thread where \XF\Search\Data\Thread::getIndexData returns null. Is there anything peculiar about the thread in question (5310431), such as not having a valid forum relation or being a redirect?

We should handle this better in Elasticsearch<5, though worth noting even 5.x is pretty ancient and XFES 2.3+ will require Elasticsearch v7.2+.
I think this would imply the rebuild was enqueued for a thread where \XF\Search\Data\Thread::getIndexData returns null. Is there anything peculiar about the thread in question (5310431), such as not having a valid forum relation or being a redirect?

We should handle this better in Elasticsearch<5, though worth noting even 5.x is pretty ancient and XFES 2.3+ will require Elasticsearch v7.2+.
 
Solution
Back
Top Bottom