Is it possible to use ES for user mentions and Find member field at https://xenforo.com/community/members/
@Xon any update on this?It has been something I've been wanting to implement but haven't had the time. Likely sometime after the XF2.2 update
Is it possible to use ES for user mentions and Find member field at https://xenforo.com/community/members/
@Xon any update on this?It has been something I've been wanting to implement but haven't had the time. Likely sometime after the XF2.2 update
I've ended up releasing this as a separate add-on that doesn't depend on ElasticSearch Essentials.@Xon any update on this?
XFES\Elasticsearch\RequestException: Elasticsearch error: field value function must not produce negative scores, but got: [-5.5000001192092896] for field value: [-5.0] src/addons/XFES/Elasticsearch/Api.php:424
Generated by: User007 Jan 18, 2023 at 4:14 PM
Stack trace
#0 src/addons/XFES/Elasticsearch/Api.php(338): XFES\Elasticsearch\Api->request('get', 'db_name/_s...', '{
"sort": [...')
#1 src/addons/XFES/Elasticsearch/Api.php(236): XFES\Elasticsearch\Api->requestFromIndex('get', '_search', Array)
#2 src/addons/XFES/Search/Source/Elasticsearch.php(750): 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, '200')
#4 src/XF/Search/Search.php(185): XFES\Search\Source\Elasticsearch->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), '200')
#5 src/XF/Search/Search.php(214): XF\Search\Search->XF\Search\{closure}(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), '200')
#6 src/XF/Search/Search.php(181): XF\Search\Search->executeSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), '200', Object(Closure), true)
#7 src/XF/Repository/Search.php(33): XF\Search\Search->search(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery))
#8 src/addons/SV/ElasticSearchEssentials/XF/Repository/Search.php(39): XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#9 src/addons/SV/ElasticSearchEssentials/Repository/SearchTrait.php(245): SV\ElasticSearchEssentials\XF\Repository\Search->SV\ElasticSearchEssentials\XF\Repository\{closure}(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#10 src/addons/SV/ElasticSearchEssentials/XF/Repository/Search.php(35): SV\ElasticSearchEssentials\XF\Repository\Search->wrapRunSearchForSvEss(Object(Closure), Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#11 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/Search.php(648): SV\ElasticSearchEssentials\XF\Repository\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array, true)
#12 src/XF/Pub/Controller/Search.php(119): SV\ElasticSearchEssentials\XF\Pub\Controller\Search->runSearch(Object(SV\ElasticSearchEssentials\XF\Search\Query\KeywordQuery), Array)
#13 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/Search.php(481): XF\Pub\Controller\Search->actionSearch()
#14 src/XF/Mvc/Dispatcher.php(352): SV\ElasticSearchEssentials\XF\Pub\Controller\Search->actionSearch(Object(XF\Mvc\ParameterBag))
#15 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'Search', Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Search), NULL)
#16 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Search), NULL)
#17 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#18 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#19 src/XF.php(524): XF\App->run()
#20 index.php(20): XF::runApp('XF\\Pub\\App')
#21 {main}
Request state
array(4) {
["url"] => string(24) "/community/search/search"
["referrer"] => string(58) "https://www.oursite.com/community/online/?type=member"
["_GET"] => array(0) {
}
["_POST"] => array(3) {
["keywords"] => string(5) "fruit"
["c"] => array(1) {
["users"] => string(0) ""
}
["_xfToken"] => string(8) "********"
}
}
@Gossipy Can you ensure you've got "Search Improvements" installed and have the option "On error, log search DSL" set. Otherwise debugging this is next to impossible.
You can open a ticket on my site with the details as this will dump a the entire query that is sent to ElasticSearch
- Improve detection of 'empty results' for various search result options (Search Improvements v2.8.0+ compatibility)
- Add "Collapsible similar content" style property option (for this add-on's widget), allowing the similar thread box to be collapsed by the user and remembered via a cookie
- Adjust various search option defaults:
- Autocomplete sort type: Relevance
- Enable Autocomplete for mobiles: true
- Apply content weights to auto-complete: true
- Weight by reply...
SELECT
xf_node.title,
COUNT(*) AS total
FROM
xf_post,
xf_thread,
xf_node,
xf_forum
WHERE
xf_post.user_id = SOMEUSERID AND xf_post.message_state = "visible" AND xf_post.thread_id = xf_thread.thread_id AND xf_node.node_id = xf_thread.node_id AND xf_node.node_id = xf_forum.node_id AND xf_forum.count_messages = 1
GROUP BY
xf_thread.node_id
ORDER BY
total
DESC
xf_thread_user_post table. This is vastly faster and avoids touching the post table.SELECT
xf_node.title,
SUM(post_count) AS total
FROM
xf_thread_user_post,
xf_thread,
xf_node,
xf_forum
WHERE
xf_thread_user_post.user_id = SOMEUSERID AND xf_thread_user_post.thread_id = xf_thread.thread_id AND xf_node.node_id = xf_thread.node_id AND xf_node.node_id = xf_forum.node_id AND xf_forum.count_messages = 1
GROUP BY
xf_thread.node_id
ORDER BY
total
DESC
xf_thread.discussion_state="visible" to query and now number from SQL (177.840) matches the number Messages on profile (177.840).xf_forum.count_messages = 1, but still not getting that number when removing that clause.xf_node.display_in_list = 0, so this is actually fine.
- Improve autocomplete results by excluding forums where the user lacks "view content" permission (aka they can see titles but not content).
- Fix "Enable suggestions only for the first page of search results" was not applying for low search result count
- Harden displaying "no results found" for search results (do not risk using cached search results).
This add-on is not vulnerable to leaking cached search results like Search Improvements v2.8.0/v2.8.1 did.
However if...
- Fix regression in v3.13.1 causing most forums to be skipped from autocomplete/similar search
The default action is to only suggest similar threads (or autocomplete results) in the same forum and subforums. Ie it deliberately doesn't show threads for everywhere.Basically, when creating a new thread title let's say a review for a company named: "Namecheap.com Review" it would only appear in "Similar threads" if creating the thread is in the same forum category.
If a thread was created in "another forum category" it would not show in "similar threads" that it was already posted.
update xf_forum
set ess_limit_autocomplete = 'all', ess_limit_suggest = 'all';
- Fix "Redirect to top validated suggestion" option was inverted.
- Fix "Redirect to top validated suggestion" could redirect to non-validated suggestions if "Validate Suggestions" was disabled
We use essential cookies to make this site work, and optional cookies to enhance your experience.