Search Improvements

Search Improvements 2.13.1

No permission to download
I have a user who is distressed that alerts and new posts are not synchronized for his watched forums, so I have been spending a lot of time trying to understand how all this works. It is still a struggle.

This morning when I logged in I had 75 copies of this error.
Code:
Server error log
[LIST]
[*]XFES\Elasticsearch\ConnectException: Elasticsearch error: cURL error 28: Operation timed out after 20001 milliseconds with 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
[*]src/addons/XFES/Elasticsearch/Api.php:390
[*]Generated by: Unknown account
[*]Sep 4, 2021 at 8:14 AM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src/addons/XFES/Elasticsearch/Api.php(330): XFES\Elasticsearch\Api->request('get', 'xfnawcc_xf/_sea...', '{
    "sort": [...')
#1 src/addons/XFES/Elasticsearch/Api.php(234): XFES\Elasticsearch\Api->requestFromIndex('get', '_search', Array)
#2 src/addons/SV/SearchImprovements/XFES/Elasticsearch/Api.php(34): XFES\Elasticsearch\Api->search(Array)
#3 src/addons/XFES/Search/Source/Elasticsearch.php(153): SV\SearchImprovements\XFES\Elasticsearch\Api->search(Array)
#4 src/addons/SV/ElasticSearchEssentials/XFES/Search/Source/Elasticsearch.php(381): XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), '200')
#5 src/XF/Search/Search.php(175): SV\ElasticSearchEssentials\XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), '200')
#6 src/XF/Repository/Search.php(34): XF\Search\Search->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query))
#7 src/addons/SV/ElasticSearchEssentials/XF/Repository/Search.php(46): XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#8 src/XF/Pub/Controller/Search.php(402): SV\ElasticSearchEssentials\XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#9 src/XF/Pub/Controller/Search.php(248): XF\Pub\Controller\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#10 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/Search.php(43): XF\Pub\Controller\Search->actionMember()
#11 src/XF/Mvc/Dispatcher.php(350): SV\ElasticSearchEssentials\XF\Pub\Controller\Search->actionMember(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'Member', Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Search), NULL)
#13 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Search), NULL)
#14 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2191): XF\Mvc\Dispatcher->run()
#16 src/XF.php(391): XF\App->run()
#17 index.php(20): XF::runApp('XF\\Pub\\App')
#18 {main}

-------------

Previous GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 20001 milliseconds with 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) - src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:185
#0 src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#2 src/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#3 src/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#4 src/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(51): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#5 src/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(66): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#6 src/vendor/guzzlehttp/guzzle/src/Middleware.php(30): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#7 src/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(70): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#8 src/vendor/guzzlehttp/guzzle/src/Middleware.php(58): GuzzleHttp\RedirectMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#9 src/vendor/guzzlehttp/guzzle/src/HandlerStack.php(67): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#10 src/vendor/guzzlehttp/guzzle/src/Client.php(277): GuzzleHttp\HandlerStack->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#11 src/vendor/guzzlehttp/guzzle/src/Client.php(98): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)
#12 src/vendor/guzzlehttp/guzzle/src/Client.php(106): GuzzleHttp\Client->sendAsync(Object(GuzzleHttp\Psr7\Request), Array)
#13 src/addons/XFES/Elasticsearch/Api.php(373): GuzzleHttp\Client->send(Object(GuzzleHttp\Psr7\Request))
#14 src/addons/XFES/Elasticsearch/Api.php(330): XFES\Elasticsearch\Api->request('get', 'xfnawcc_xf/_sea...', '{
    "sort": [...')
#15 src/addons/XFES/Elasticsearch/Api.php(234): XFES\Elasticsearch\Api->requestFromIndex('get', '_search', Array)
#16 src/addons/SV/SearchImprovements/XFES/Elasticsearch/Api.php(34): XFES\Elasticsearch\Api->search(Array)
#17 src/addons/XFES/Search/Source/Elasticsearch.php(153): SV\SearchImprovements\XFES\Elasticsearch\Api->search(Array)
#18 src/addons/SV/ElasticSearchEssentials/XFES/Search/Source/Elasticsearch.php(381): XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), '200')
#19 src/XF/Search/Search.php(175): SV\ElasticSearchEssentials\XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), '200')
#20 src/XF/Repository/Search.php(34): XF\Search\Search->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query))
#21 src/addons/SV/ElasticSearchEssentials/XF/Repository/Search.php(46): XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#22 src/XF/Pub/Controller/Search.php(402): SV\ElasticSearchEssentials\XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#23 src/XF/Pub/Controller/Search.php(248): XF\Pub\Controller\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#24 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/Search.php(43): XF\Pub\Controller\Search->actionMember()
#25 src/XF/Mvc/Dispatcher.php(350): SV\ElasticSearchEssentials\XF\Pub\Controller\Search->actionMember(Object(XF\Mvc\ParameterBag))
#26 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'Member', Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Search), NULL)
#27 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Search), NULL)
#28 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#29 src/XF/App.php(2191): XF\Mvc\Dispatcher->run()
#30 src/XF.php(391): XF\App->run()
#31 index.php(20): XF::runApp('XF\\Pub\\App')
#32 {main}

Those error reports were preceded by two instances of this one that I would have thought was unrelated except for the sequence of events.
Code:
Server error log
[LIST]
[*]XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '101742-144328' for key 'user_id_thread_id'
[*]src/XF/Db/AbstractStatement.php:228
[*]Generated by: John P.
[*]Sep 3, 2021 at 8:05 AM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
INSERT  INTO `xfa_wrtt_thread_read` (`thread_id`, `user_id`, `thread_read_date`) VALUES (?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/addons/XFA/WhoReadThisThread/XF/Repository/Thread.php(41): XF\Db\AbstractAdapter->insert('xfa_wrtt_thread...', Array)
#5 src/XF/Pub/Controller/Thread.php(89): XFA\WhoReadThisThread\XF\Repository\Thread->markThreadReadByVisitor(Object(SV\ElasticSearchEssentials\XF\Entity\Thread), 1630475698)
#6 src/addons/Andy/History/XF/Pub/Controller/Thread.php(12): XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#7 src/addons/XenConcept/NextPreviousThread/XF/Pub/Controller/Thread.php(20): Andy\History\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#8 src/addons/XFMG/XF/Pub/Controller/Thread.php(11): XenConcept\NextPreviousThread\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#9 src/addons/XDinc/FThread/Pub/Controller/Thread.php(12): XFMG\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#10 src/addons/SV/UserEssentials/XF/Pub/Controller/Thread.php(29): XDinc\FThread\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#11 src/addons/SV/ModeratorEssentials/XF/Pub/Controller/Thread.php(28): SV\UserEssentials\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#12 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/Thread.php(23): SV\ModeratorEssentials\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#13 src/XF/Mvc/Dispatcher.php(350): SV\ElasticSearchEssentials\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#14 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'Index', Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Thread), NULL)
#15 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Thread), NULL)
#16 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(2191): XF\Mvc\Dispatcher->run()
#18 src/XF.php(391): XF\App->run()
#19 index.php(20): XF::runApp('XF\\Pub\\App')
#20 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(67) "/threads/the-riverside-walthams-most-popular-movement-grade.144328/"
  ["referrer"] => string(55) "https://mb.nawcc.org/forums/american-pocket-watches.11/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
I have a user who is distressed that alerts and new posts are not synchronized for his watched forums, so I have been spending a lot of time trying to understand how all this works. It is still a struggle.
By design, XenForo alerts are only sent if a user has visited a thread. This results in "missed" updates quite easily.

I have a paid add-on which will cause alerts to be generated if they do not have unread alerts (or just always generated, admin option)


This morning when I logged in I had 75 copies of this error.
Code:
Server error log
[LIST]
[*]XFES\Elasticsearch\ConnectException: Elasticsearch error: cURL error 28: Operation timed out after 20001 milliseconds with 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
[*]src/addons/XFES/Elasticsearch/Api.php:390
[*]Generated by: Unknown account
[*]Sep 4, 2021 at 8:14 AM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src/addons/XFES/Elasticsearch/Api.php(330): XFES\Elasticsearch\Api->request('get', 'xfnawcc_xf/_sea...', '{
    "sort": [...')
#1 src/addons/XFES/Elasticsearch/Api.php(234): XFES\Elasticsearch\Api->requestFromIndex('get', '_search', Array)
#2 src/addons/SV/SearchImprovements/XFES/Elasticsearch/Api.php(34): XFES\Elasticsearch\Api->search(Array)
#3 src/addons/XFES/Search/Source/Elasticsearch.php(153): SV\SearchImprovements\XFES\Elasticsearch\Api->search(Array)
#4 src/addons/SV/ElasticSearchEssentials/XFES/Search/Source/Elasticsearch.php(381): XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), '200')
#5 src/XF/Search/Search.php(175): SV\ElasticSearchEssentials\XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), '200')
#6 src/XF/Repository/Search.php(34): XF\Search\Search->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query))
#7 src/addons/SV/ElasticSearchEssentials/XF/Repository/Search.php(46): XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#8 src/XF/Pub/Controller/Search.php(402): SV\ElasticSearchEssentials\XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#9 src/XF/Pub/Controller/Search.php(248): XF\Pub\Controller\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#10 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/Search.php(43): XF\Pub\Controller\Search->actionMember()
#11 src/XF/Mvc/Dispatcher.php(350): SV\ElasticSearchEssentials\XF\Pub\Controller\Search->actionMember(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'Member', Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Search), NULL)
#13 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Search), NULL)
#14 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2191): XF\Mvc\Dispatcher->run()
#16 src/XF.php(391): XF\App->run()
#17 index.php(20): XF::runApp('XF\\Pub\\App')
#18 {main}

-------------

Previous GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 20001 milliseconds with 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) - src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:185
#0 src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#2 src/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#3 src/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#4 src/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(51): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#5 src/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(66): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#6 src/vendor/guzzlehttp/guzzle/src/Middleware.php(30): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#7 src/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(70): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#8 src/vendor/guzzlehttp/guzzle/src/Middleware.php(58): GuzzleHttp\RedirectMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#9 src/vendor/guzzlehttp/guzzle/src/HandlerStack.php(67): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#10 src/vendor/guzzlehttp/guzzle/src/Client.php(277): GuzzleHttp\HandlerStack->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#11 src/vendor/guzzlehttp/guzzle/src/Client.php(98): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)
#12 src/vendor/guzzlehttp/guzzle/src/Client.php(106): GuzzleHttp\Client->sendAsync(Object(GuzzleHttp\Psr7\Request), Array)
#13 src/addons/XFES/Elasticsearch/Api.php(373): GuzzleHttp\Client->send(Object(GuzzleHttp\Psr7\Request))
#14 src/addons/XFES/Elasticsearch/Api.php(330): XFES\Elasticsearch\Api->request('get', 'xfnawcc_xf/_sea...', '{
    "sort": [...')
#15 src/addons/XFES/Elasticsearch/Api.php(234): XFES\Elasticsearch\Api->requestFromIndex('get', '_search', Array)
#16 src/addons/SV/SearchImprovements/XFES/Elasticsearch/Api.php(34): XFES\Elasticsearch\Api->search(Array)
#17 src/addons/XFES/Search/Source/Elasticsearch.php(153): SV\SearchImprovements\XFES\Elasticsearch\Api->search(Array)
#18 src/addons/SV/ElasticSearchEssentials/XFES/Search/Source/Elasticsearch.php(381): XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), '200')
#19 src/XF/Search/Search.php(175): SV\ElasticSearchEssentials\XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), '200')
#20 src/XF/Repository/Search.php(34): XF\Search\Search->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query))
#21 src/addons/SV/ElasticSearchEssentials/XF/Repository/Search.php(46): XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#22 src/XF/Pub/Controller/Search.php(402): SV\ElasticSearchEssentials\XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#23 src/XF/Pub/Controller/Search.php(248): XF\Pub\Controller\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\Query), Array, false)
#24 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/Search.php(43): XF\Pub\Controller\Search->actionMember()
#25 src/XF/Mvc/Dispatcher.php(350): SV\ElasticSearchEssentials\XF\Pub\Controller\Search->actionMember(Object(XF\Mvc\ParameterBag))
#26 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'Member', Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Search), NULL)
#27 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Search), NULL)
#28 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#29 src/XF/App.php(2191): XF\Mvc\Dispatcher->run()
#30 src/XF.php(391): XF\App->run()
#31 index.php(20): XF::runApp('XF\\Pub\\App')
#32 {main}
This is nothing todo with any add-on, but the ElasticSearch instance requiring more memory or a faster SSD.

Those error reports were preceded by two instances of this one that I would have thought was unrelated except for the sequence of events.
Code:
Server error log
[LIST]
[*]XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '101742-144328' for key 'user_id_thread_id'
[*]src/XF/Db/AbstractStatement.php:228
[*]Generated by: John P.
[*]Sep 3, 2021 at 8:05 AM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
INSERT  INTO `xfa_wrtt_thread_read` (`thread_id`, `user_id`, `thread_read_date`) VALUES (?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/addons/XFA/WhoReadThisThread/XF/Repository/Thread.php(41): XF\Db\AbstractAdapter->insert('xfa_wrtt_thread...', Array)
#5 src/XF/Pub/Controller/Thread.php(89): XFA\WhoReadThisThread\XF\Repository\Thread->markThreadReadByVisitor(Object(SV\ElasticSearchEssentials\XF\Entity\Thread), 1630475698)
#6 src/addons/Andy/History/XF/Pub/Controller/Thread.php(12): XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#7 src/addons/XenConcept/NextPreviousThread/XF/Pub/Controller/Thread.php(20): Andy\History\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#8 src/addons/XFMG/XF/Pub/Controller/Thread.php(11): XenConcept\NextPreviousThread\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#9 src/addons/XDinc/FThread/Pub/Controller/Thread.php(12): XFMG\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#10 src/addons/SV/UserEssentials/XF/Pub/Controller/Thread.php(29): XDinc\FThread\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#11 src/addons/SV/ModeratorEssentials/XF/Pub/Controller/Thread.php(28): SV\UserEssentials\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#12 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/Thread.php(23): SV\ModeratorEssentials\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#13 src/XF/Mvc/Dispatcher.php(350): SV\ElasticSearchEssentials\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#14 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'Index', Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Thread), NULL)
#15 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Thread), NULL)
#16 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(2191): XF\Mvc\Dispatcher->run()
#18 src/XF.php(391): XF\App->run()
#19 index.php(20): XF::runApp('XF\\Pub\\App')
#20 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(67) "/threads/the-riverside-walthams-most-popular-movement-grade.144328/"
  ["referrer"] => string(55) "https://mb.nawcc.org/forums/american-pocket-watches.11/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
This is from XFA\WhoReadThisThread, I'ld recommend posting in their add-on thread about this bug.
 
That is for when you have XenForo Enhanced Search. It doesn't add a sort-order field to the basic search

Very late follow-up, but how difficult would it be to add in a sort-order field to the basic search? I don't care much about relevance; just trying to allow the users to be able to switch the order from most->least recent to least->most recent.
 
It would be great if the Content Type Weighting could be extended to the new thread types in XF 2.2 (e.g. Articles).
 
Is there a search function, for example, for additional resource fields? If not, are there any plans to implement such a search?
 
Xon updated Search Improvements with a new update entry:

2.5.3 - Backend feature update

This feature is powering tag autocomplete and username autocomplete which supports partial matches, and non-prefix lookups on SpaceBattles.

  • Require XenForo 2.2+, removes xf2.0/xf2.1 support
  • Add "Specialized index" support
    • Specialized search index allows generating single-purpose elastic search indexes while re-using as much XF search infrastructure as possible.
      • Elasticsearch index is more akin to an SQL table than an entire database, so for very specific...

Read the rest of this update entry...
 

This (paid) add-on is an example of the above "specialized index", it creates an index with just the user/email and replaces the admin quick search and front-end username autocomplete with an elasticsearch powered version.

I plan to add user-group support for User Mention Improvements at some stage into this username autocomplete add-on
 
Hi @Xon, getting lots of these server errors every minute:

Server error log
ErrorException: {"docvalue_fields":["discussion_id","user","date"],"_source":false,"size":10,"query":{"bool":{"filter":[{"term":{"type":"thread"}},{"term":{"node":21}},{"bool":{"should":[{"bool":{"filter":[{"terms":{"type":["post","thread"]}}]}}],"minimum_should_match":1}}],"must_not":[{"term":{"thread":65}}],"must":[{"multi_match":{"type":"most_fields","query":"content","operator":"or","fields":["title","elasticess_title","title.exact^1.5"]}}]}}} src/XF/Error.php:77
Generated by: Lee Sep 24, 2022 at 9:55 AM
Stack trace

0 src/XF.php(219): XF\Error->logError('{"docvalue_fiel...', false)​

1 src/addons/SV/SearchImprovements/XFES/Elasticsearch/Api.php(26): XF::logError('{"docvalue_fiel...')​

2 src/addons/XFES/Search/Source/Elasticsearch.php(750): SV\SearchImprovements\XFES\Elasticsearch\Api->search(Array)​

3 src/addons/XFES/Search/Source/Elasticsearch.php(146): XFES\Search\Source\Elasticsearch->executeSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, 10)​

4 src/XF/Search/Search.php(185): XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), 10)​

5 src/XF/Search/Search.php(214): XF\Search\Search->XF\Search{closure}(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), 10)​

6 src/XF/Search/Search.php(181): XF\Search\Search->executeSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), 10, Object(Closure), true)​

7 src/addons/SV/ElasticSearchEssentials/Service/AutoCompleter.php(476): XF\Search\Search->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), 10, true)​

8 src/addons/SV/ElasticSearchEssentials/Service/SimilarContentFinder.php(274): SV\ElasticSearchEssentials\Service\AutoCompleter->getResults()​

9 src/addons/SV/ElasticSearchEssentials/Widget/SimilarThreads.php(61): SV\ElasticSearchEssentials\Service\SimilarContentFinder->getSimilarContents()​

10 internal_data/code_cache/widgets/_26_svESE_similar_threads.php(5): SV\ElasticSearchEssentials\Widget\SimilarThreads->render()​

11 src/XF/Template/Templater.php(7653): XF\SubContainer\Widget->{closure}(Object(SV\LiveContent\XF\Template\Templater), Array, Array)​

12 src/XF/SubContainer/Widget.php(168): XF\Template\Templater->renderWidgetClosure(Object(Closure), Array)​

13 src/XF/Template/Templater.php(1936): XF\SubContainer\Widget->getCompiledWidget(Array, Array)​

14 internal_data/code_cache/templates/l1/s11/public/thread_view.php(1035): XF\Template\Templater->widgetPosition('sv_threadview...', Array)​

15 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\LiveContent\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))​

16 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)​

17 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()​

18 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\View', 'public:thread_v...', Array)​

19 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))​

20 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))​

21 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')​

22 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()​

23 src/XF.php(524): XF\App->run()​

24 index.php(20): XF::runApp('XF\Pub\App')​

25 {main}​

Request state
array(4) {
["url"] => string(20) "/threads/content.65/"
["referrer"] => string(46) "https://livingfrugally.net/threads/content.65/"
["_GET"] => array(1) {
["/threads/content_65/"] => string(0) ""
}
["_POST"] => array(0) {
}
}

Any idea what I have done? 🙈
 
Hello, maybe there is a typo here : option_explain.svDefaultSearchOrder
The allows you to change the default order for search results. This affects quick searches and the default value selected on the advanced search form.
 
Xon updated Search Improvements with a new update entry:

2.6.2 - Feature update

  • Require php 7.2+
  • Add ability to push "can view threads/tickets by other" permission(s) into ElasticSearch query, reducing php-side culling of matching content.
    This improves searching forums/tickets where the user lacks these permissions.

    This is gated behind the option Push "View X by others" check into XFES', as it requires a full reindex. (Default disabled)

    Supports the following add-ons:
    • ...

Read the rest of this update entry...
 
This should really improve when a user tries searching forum when they lack the "view threads by others" or in @NixFifty Tickets (and without the moderator "view tickets by others" permission). It should work without ElasticSearch Essentials, but that code path isn't as heavily tested.
 
Top Bottom