ElasticSearch Essentials

ElasticSearch Essentials [Paid] 3.15.12

No permission to buy ($30.00)
Small problem with the auto-complete functionality in combination with PixelExit themes.
It seems the add-on has support for it, but the modification does not get applied.

This is with XenBase:

PAGE_CONTAINER
Code:
<form action="{{ link('search/search') }}" id="xbSearch" class="xb-search" method="post" data-no-auto-focus="true">

FIND (does not work):
Code:
#<form action="{{ link\('search\/search'\.*?\) }}" id="xbSearch"#si
Will be fixed in the next version, it was configured to use string replace instead of a regex
 
Also, just to be sure, I don't want exact text search, I like the way it is now, because it finds better results. I just want better weighting I guess?
It improves the weighting by adding the exact text to the index and preferring it if it exists, while also supporting more fuzzy matching. This tends to give more exact matches as a user would expect
 
  • Like
Reactions: sbj
Ah, I see it now!

I was looking at the "limit results by" fields. If anyone else misses it, it's in the list of advanced options when viewing a forum/node :)

1643676969062.webp
 
@Xon
can you take a look at these error? latest version.
Code:
ErrorException: Template error: [E_USER_WARNING] Method getTitleFallback is not callable on the given object (SV\ElasticSearchEssentials\XF\Entity\Node) src/XF/Template/Templater.php:1186
Code:
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nginx/dom...', 1186)
#1 src/XF/Template/Templater.php(1186): trigger_error('Method getTitle...', 512)
#2 internal_data/code_cache/templates/l1/s0/admin/forum_edit.php(59): XF\Template\Templater->method(Object(SV\ElasticSearchEssentials\XF\Entity\Node), 'getTitleFallbac...', Array)
#3 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#4 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('forum_edit', Array, true, NULL)
#5 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('admin:forum_edi...', Array)
#6 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#7 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Forum\\Edit', 'admin:forum_edi...', Array)
#8 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#11 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#12 src/XF.php(517): XF\App->run()
#13 admin.php(13): XF::runApp('XF\\Admin\\App')
#14 {main}
Code:
array(4) {
  ["url"] => string(35) "/admin.php?forums/main-forum.2/edit"
  ["referrer"] => string(43) "https://****/admin.php?nodes/"
  ["_GET"] => array(1) {
    ["forums/main-forum_2/edit"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
@phucvandinh getTitleFallback is not a method any of my add-on's create.
Thank for your response, may be it's from SEO addon, @Nulumia, can you take a look?
Code:
ErrorException: Template error: [E_USER_WARNING] Method getTitleFallback is not callable on the given object (SV\ElasticSearchEssentials\XF\Entity\Node) src/XF/Template/Templater.php:1186
Code:
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nginx/dom...', 1186)
#1 src/XF/Template/Templater.php(1186): trigger_error('Method getTitle...', 512)
#2 internal_data/code_cache/templates/l1/s0/admin/forum_edit.php(59): XF\Template\Templater->method(Object(SV\ElasticSearchEssentials\XF\Entity\Node), 'getTitleFallbac...', Array)
#3 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#4 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('forum_edit', Array, true, NULL)
#5 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('admin:forum_edi...', Array)
#6 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#7 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Forum\\Edit', 'admin:forum_edi...', Array)
#8 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#11 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#12 src/XF.php(517): XF\App->run()
#13 admin.php(13): XF::runApp('XF\\Admin\\App')
#14 {main}
Code:
array(4) {
  ["url"] => string(35) "/admin.php?forums/main-forum.2/edit"
  ["referrer"] => string(43) "https://****/admin.php?nodes/"
  ["_GET"] => array(1) {
    ["forums/main-forum_2/edit"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
Xon updated ElasticSearch Essentials with a new update entry:

3.9.0 - Feature update

  • Require XenForo 2.2+
  • Fix "[ESE] Autocomplete" permission was not being checked for root-level autocomplete attempts
    • User's must have '[ESE] Autocomplete' permission in a global context, while '[ESE] Autocomplete' can be revoked per-forum.
  • Allow autocomplete links to be clickable
  • Add "last updated limit" to autocomplete & similar thread widget to support limiting by last update for threads/resources/Bob's AMS Articles
    • Requires re-indexing of...

Read the rest of this update entry...
 
Will be fixed in the next version, it was configured to use string replace instead of a regex
The auto complete now works with the XenBase theme.
However, the results are pushed to the back (this is the search bar in the header):

1644319104298.webp1644319111283.webp
 
@Xon just updated to 3.9.1 today but updated via addon install along with your Improved Warnings and Improved Report addons in one go. Got this error logged in server error logs

PHP:
ErrorException: Elasticsearch index must be rebuilt to include custom mappings. src/XF/Error.php:77
Generated by: eva2000 Feb 15, 2022 at 8:30 AM
Stack trace
#0 src/XF.php(218): XF\Error->logError('Elasticsearch i...', true)
#1 src/addons/SV/StandardLib/InstallerHelper.php(724): XF::logError('Elasticsearch i...', true)
#2 src/addons/SV/ElasticSearchEssentials/Setup.php(518): SV\ElasticSearchEssentials\Setup->checkElasticSearchOptimizableState()
#3 src/XF/AddOn/AddOn.php(587): SV\ElasticSearchEssentials\Setup->postUpgrade(3090003, Array)
#4 src/XF/Job/AddOnInstallBatch.php(380): XF\AddOn\AddOn->postUpgrade(Array)
#5 src/XF/Job/AddOnInstallBatch.php(99): XF\Job\AddOnInstallBatch->stepFinalize(Object(XF\Timer))
#6 src/XF/Job/Manager.php(260): XF\Job\AddOnInstallBatch->run(8)
#7 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#8 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#9 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#10 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(Truonglv\ImageOptimizer\XF\Admin\Controller\Tools), NULL)
#12 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Truonglv\ImageOptimizer\XF\Admin\Controller\Tools), NULL)
#13 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#15 src/XF.php(517): XF\App->run()
#16 admin.php(13): XF::runApp('XF\\Admin\\App')
#17 {main}
Request state
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(51) "https://domain.com/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(87) "https://domain.com/admin.php?add-ons/install-from-archive-complete&batch_id=19"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(5) "11235"
  }
}
 
@Xon just updated to 3.9.1 today but updated via addon install along with your Improved Warnings and Improved Report addons in one go. Got this error logged in server error logs

PHP:
ErrorException: Elasticsearch index must be rebuilt to include custom mappings. src/XF/Error.php:77
Generated by: eva2000 Feb 15, 2022 at 8:30 AM
Stack trace
#0 src/XF.php(218): XF\Error->logError('Elasticsearch i...', true)
#1 src/addons/SV/StandardLib/InstallerHelper.php(724): XF::logError('Elasticsearch i...', true)
#2 src/addons/SV/ElasticSearchEssentials/Setup.php(518): SV\ElasticSearchEssentials\Setup->checkElasticSearchOptimizableState()
#3 src/XF/AddOn/AddOn.php(587): SV\ElasticSearchEssentials\Setup->postUpgrade(3090003, Array)
#4 src/XF/Job/AddOnInstallBatch.php(380): XF\AddOn\AddOn->postUpgrade(Array)
#5 src/XF/Job/AddOnInstallBatch.php(99): XF\Job\AddOnInstallBatch->stepFinalize(Object(XF\Timer))
#6 src/XF/Job/Manager.php(260): XF\Job\AddOnInstallBatch->run(8)
#7 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#8 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#9 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#10 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(Truonglv\ImageOptimizer\XF\Admin\Controller\Tools), NULL)
#12 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Truonglv\ImageOptimizer\XF\Admin\Controller\Tools), NULL)
#13 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#15 src/XF.php(517): XF\App->run()
#16 admin.php(13): XF::runApp('XF\\Admin\\App')
#17 {main}
Request state
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(51) "https://domain.com/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(87) "https://domain.com/admin.php?add-ons/install-from-archive-complete&batch_id=19"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(5) "11235"
  }
}
This is expected. It logs that to the XF error log as there is no other place to put that information.

If you view the "Enhanced search" setup page, it will have "Optimization required: Yes" bit. Under there will be a "Elastic Search Type mappings" which will tell you what isn't expected. It is possible that some add-ons are not correctly extending search, so things are added to the index it doesn't expect.
 
Under there will be a "Elastic Search Type mappings" which will tell you what isn't expected. It is possible that some add-ons are not correctly extending search, so things are added to the index it doesn't expect.
Thanks didn't really notice that dropdown/expanded listing for mappings before

Optimization required No
Elastic Search Type mappings
xf
albumcat OK, long
assigned_user OK, long
content_id OK, long
content_type OK, text
date OK, stored, long
discussion_id OK, stored, long
elasticess_title OK, array ( 'type' => 'text', 'analyzer' => 'elasticess_autocomplete_index', 'search_analyzer' => 'elasticess_autocomplete_search', )
expiry_date OK, long
hidden OK, boolean
is_report OK, long
last_update OK, long
mediaalbum OK, long
mediacat OK, long
message OK, text
node OK, long
points OK, long
post_reply_ban OK, long
prefix OK, long
profile_user OK, long
report OK, long
report_content_type OK, keyword
report_state OK, keyword
rescat OK, long
resource OK, long
resprefix OK, long
state_change OK, keyword
tag OK, long
thread OK, long
thread_reply_ban OK, long
thread_type OK, keyword
title OK, array ( 'type' => 'text', 'fields' => array ( 'exact' => array ( 'type' => 'text', 'analyzer' => 'elasticess_near_exact', ), ), )
type OK, keyword
user OK, stored, long
warned_user OK, long
 
@Xon Getting lot of Server error log with 3.9.4 and user can not made post.

Code:
InvalidArgumentException: Unknown entity option: svOnlyCanonicalTags src/XF/Mvc/Entity/Entity.php:1003

Generated by: MOHAKAAL May 6, 2022 at 1:02 AM

Stack trace

#0 src/addons/SV/ElasticSearchEssentials/XFES/Search/Source/Elasticsearch.php(66): XF\Mvc\Entity\Entity->setOption('svOnlyCanonical...', false)
#1 src/XF/Search/Search.php(42): SV\ElasticSearchEssentials\XFES\Search\Source\Elasticsearch->index(Object(XF\Search\IndexRecord))
#2 src/addons/SV/ElasticSearchEssentials/XF/Search/Search.php(43): XF\Search\Search->index('post', Object(SV\ThreadReplyBanTeeth\XF\Entity\Post), true)
#3 src/XF/Behavior/Indexable.php(48): SV\ElasticSearchEssentials\XF\Search\Search->index('post', Object(SV\ThreadReplyBanTeeth\XF\Entity\Post), true)
#4 src/XF.php(377): XF\Behavior\Indexable->XF\Behavior\{closure}()
#5 src/XF/Mvc/Dispatcher.php(158): XF::triggerRunOnce(true)
#6 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#8 src/XF.php(524): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

Request state

array(4) {
  ["url"] => string(19) "/posts/2282654/edit"
  ["referrer"] => string(43) "/threads/91024/page-2"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(6) {
    ["_xfToken"] => string(8) "********"
    ["_xfInlineEdit"] => string(1) "1"
    ["message_html"] => string(27169) "<p id="isPasted"><strong><span style="font-size: 18px;"></strong></span></p><p><span style="font-size: 18px;"><strong><br></strong></span></p><p><strong><span style="font-size: 18px;">ক্রমশঃ প্রকাশ্য ।</span></strong></p>"
    ["_xfRequestUri"] => string(21) "/threads/91024/page-2"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Top Bottom