ElasticSearch Essentials

ElasticSearch Essentials [Paid] 3.15.12

No permission to buy ($30.00)
@ivp please do a full re-index truncating the index (or purge then index).

What version of ElasticSearch are you running?
 
Elastic Search Type mappings is fine after deleting & recreating the index.

But still seeing "XFES\Elasticsearch\DataException: Elasticsearch error: Failed to encode body for Elasticsearch request get xenforo/_search: Malformed UTF-8 characters, possibly incorrectly encoded" error.

This error is logged every 30 minutes or so.
 
@ivp if you have Search Improvements installed, please enable the "on error, log search DSL" option and post that here. The error will then log the search query being executed to the Xenforo error log.

This maybe a bug with XenForo, but logging the query should help determine the failure mode.
 
About the post areas tab in profile: I have a forum (report forum) where a user can only see his own threads. But on other tabs user can see how much a user has posted inside that secret forum. That shouldn't be the case, right?
 
@FloV viewing the post count is based on if the forum itself is visible, and isn't checking the "View thread by other users" permission. I'll fix that for the next version, but a quick fix is to exclude that secret forum from post area displaying
 
@Xon "Log search DSL" option properly logs to the server log, but "On error, log search DSL" doesn't. Probably it doesn't catch this error?
 
Can you try with all 3rd party add-ons disabled and see if it still occurs? This will rule out if it is an add-on or XenForo bug.
 
Cannot disable add-ons on production forum.

Since stack trace mentions your add-on Search Improvements, can I add some code there to debug it?

Those two errors happen exactly every hour at xx:00 in /job.php

XF\PrintableException: Similar thread cache rebuild failure: The search could not be completed. Please try again later. src/XF.php:763
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(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), Array, 100)
#2 src/addons/XFES/XF/Search/Search.php(36): XFES\Search\Source\Elasticsearch->moreLikeThis(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100)
#3 src/XF/Search/Search.php(212): XFES\XF\Search\Search->XFES\XF\Search\{closure}(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100)
#4 src/addons/XFES/XF/Search/Search.php(32): XF\Search\Search->executeSearch(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100, Object(Closure), false)
#5 src/addons/XFES/XF/Repository/Thread.php(87): XFES\XF\Search\Search->moreLikeThis(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100, false)
#6 src/addons/XFES/XF/Repository/Thread.php(52): XFES\XF\Repository\Thread->getSimilarThreadIds(Object(SV\ElasticSearchEssentials\XF\Entity\Thread), 100, false)
#7 src/addons/XFES/Job/SimilarThreads.php(64): XFES\XF\Repository\Thread->rebuildSimilarThreadsCache(Object(SV\ElasticSearchEssentials\XF\Entity\Thread))
#8 src/XF/Job/AbstractRebuildJob.php(47): XFES\Job\SimilarThreads->rebuildById(422161)
#9 src/addons/XFES/Job/SimilarThreads.php(23): XF\Job\AbstractRebuildJob->run(8)
#10 src/XF/Job/Manager.php(258): XFES\Job\SimilarThreads->run(8)
#11 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, 8)
#12 src/XF/Job/Manager.php(84): XF\Job\Manager->runJobEntry(Array, 8)
#13 job.php(43): XF\Job\Manager->runQueue(false, 8)
#14 {main}
XFES\Elasticsearch\DataException: Elasticsearch error: Failed to encode body for Elasticsearch request get xenforo/_search: Malformed UTF-8 characters, possibly incorrectly encoded src/addons/XFES/Elasticsearch/Api.php:365
Code:
#0 src/addons/XFES/Elasticsearch/Api.php(331): XFES\Elasticsearch\Api->request('get', 'xenforo/_search', false)
#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(748): SV\SearchImprovements\XFES\Elasticsearch\Api->search(Array)
#4 src/addons/XFES/Search/Source/Elasticsearch.php(227): XFES\Search\Source\Elasticsearch->executeSearch(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), Array, 100)
#5 src/addons/XFES/XF/Search/Search.php(36): XFES\Search\Source\Elasticsearch->moreLikeThis(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100)
#6 src/XF/Search/Search.php(212): XFES\XF\Search\Search->XFES\XF\Search\{closure}(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100)
#7 src/addons/XFES/XF/Search/Search.php(32): XF\Search\Search->executeSearch(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100, Object(Closure), false)
#8 src/addons/XFES/XF/Repository/Thread.php(87): XFES\XF\Search\Search->moreLikeThis(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100, false)
#9 src/addons/XFES/XF/Repository/Thread.php(52): XFES\XF\Repository\Thread->getSimilarThreadIds(Object(SV\ElasticSearchEssentials\XF\Entity\Thread), 100, false)
#10 src/addons/XFES/Job/SimilarThreads.php(64): XFES\XF\Repository\Thread->rebuildSimilarThreadsCache(Object(SV\ElasticSearchEssentials\XF\Entity\Thread))
#11 src/XF/Job/AbstractRebuildJob.php(47): XFES\Job\SimilarThreads->rebuildById(422161)
#12 src/addons/XFES/Job/SimilarThreads.php(23): XF\Job\AbstractRebuildJob->run(8)
#13 src/XF/Job/Manager.php(258): XFES\Job\SimilarThreads->run(8)
#14 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, 8)
#15 src/XF/Job/Manager.php(84): XF\Job\Manager->runJobEntry(Array, 8)
#16 job.php(43): XF\Job\Manager->runQueue(false, 8)
#17 {main}

Turned on "Log search DSL" and got third error with empty title at xx:00.

ErrorException: src/XF/Error.php:75
Code:
#0 src/XF.php(213): XF\Error->logError(false, false)
#1 src/addons/SV/SearchImprovements/XFES/Elasticsearch/Api.php(26): XF::logError(false)
#2 src/addons/XFES/Search/Source/Elasticsearch.php(748): SV\SearchImprovements\XFES\Elasticsearch\Api->search(Array)
#3 src/addons/XFES/Search/Source/Elasticsearch.php(227): XFES\Search\Source\Elasticsearch->executeSearch(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), Array, 100)
#4 src/addons/XFES/XF/Search/Search.php(36): XFES\Search\Source\Elasticsearch->moreLikeThis(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100)
#5 src/XF/Search/Search.php(212): XFES\XF\Search\Search->XFES\XF\Search\{closure}(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100)
#6 src/addons/XFES/XF/Search/Search.php(32): XF\Search\Search->executeSearch(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100, Object(Closure), false)
#7 src/addons/XFES/XF/Repository/Thread.php(87): XFES\XF\Search\Search->moreLikeThis(Object(SV\ElasticSearchEssentials\XFES\Search\Query\MoreLikeThisQuery), 100, false)
#8 src/addons/XFES/XF/Repository/Thread.php(52): XFES\XF\Repository\Thread->getSimilarThreadIds(Object(SV\ElasticSearchEssentials\XF\Entity\Thread), 100, false)
#9 src/addons/XFES/Job/SimilarThreads.php(64): XFES\XF\Repository\Thread->rebuildSimilarThreadsCache(Object(SV\ElasticSearchEssentials\XF\Entity\Thread))
#10 src/XF/Job/AbstractRebuildJob.php(47): XFES\Job\SimilarThreads->rebuildById(422161)
#11 src/addons/XFES/Job/SimilarThreads.php(23): XF\Job\AbstractRebuildJob->run(8)
#12 src/XF/Job/Manager.php(258): XFES\Job\SimilarThreads->run(8)
#13 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, 8)
#14 src/XF/Job/Manager.php(84): XF\Job\Manager->runJobEntry(Array, 8)
#15 job.php(43): XF\Job\Manager->runQueue(false, 8)
#16 {main}

Note: using "Replace Enhanced Search 2.2's suggest threads implementation" if that is relevant.
 
Last edited:
Ensure utf8mb4 support is enabled in the database, and the XF migration process has been run (ie run it again and see if it finds any tables that need converting) then try to purge the index and re-index. There is likely some bad data somewhere
 
Hi @Xon,

We're experiencing some problems with the "Only search deleted" option returning results where state = 'visible'. It seems the behavior is identical to the "include deleted" option. A quick review of the Search Controller, QueryTrait, and svESE_search_form_macros_deleted_macro revealed no immediately obvious issue that I could see. So far we've confirmed the unexpected behavior in both "Search everything" and "Search threads".

Additional context:

Our site moderators are trying to search for deleted posts by a specific user.

Steps to reproduce:

- Begin a "Search everything" or "Search threads" search.

- Enter a username in "Posted by", but do not enter a keyword.

- Select "Only search deleted".

- Leave remaining parameters at their default values.

- Execute search.

System info:

- XF v2.2.4

- ESE v3.6.1

- PHP v7.3.27

- ES v6.8.5

If you need any other information, please feel free to send me a message!

Best,
Zig
 
Refactoring at some stage made the "only allow deleted" feature break. Will work on fixing that for the next version
 
  • Like
Reactions: Zig
Xon updated ElasticSearch Essentials with a new update entry:

3.6.4 - Bugfix update

  • Fix that "postings" profile tab would never show deleted content, by supporting moderator "Include deleted" search option
  • Allow non-moderator users with global "View deleted threads / posts" permission to search for deleted content
  • Reduce amount of data loaded when viewing a user's "Post Area" profile tab
  • Fix "Only search deleted" search feature not working
  • Fix "Push specific content type permission checks into general search" option not working

Read the rest of this update entry...
 
  • Like
Reactions: Zig
Is it possible for the auto complete results to be displayed in a separate div below the search box? I'd like the ability to right click on results and copy the link without having to go all the way to the result page.
 
  • Like
Reactions: sbj
@Xon

Do these node settings limit the autocomplete and similar threads results shown when people are viewing this node or does this limit whether or not the threads in this node appear in autocomplete and similar threads results in other nodes on the site?

1617294806207.webp
 
I'd like to have more control on the setting "Similar Content" which enables the possibility to display similar threads at the bottom of thread and, in particular:

  • Excluding other nodes from displaying as similar threads when I'm in a different node
  • Adding the ability to sort similar threads by tags only
  • Disabling Similar Content in some nodes so that I don't see similar threads in a node called "Introductions" or "Rules" for example

Is this possible?
 
Last edited:
Top Bottom