ElasticSearch Essentials

ElasticSearch Essentials [Paid] 3.15.12

No permission to buy ($30.00)
After updating I get this on the whole site:

An exception occurred: [Error] Call to undefined method SV\StandardLib\Repository\Helper::aliasClass() in src/addons/SV/ElasticSearchEssentials/XF/Repository/Search.php on line 7

  1. include() in src/vendor/composer/ClassLoader.php at line 444
  2. Composer\Autoload\includeFile() in src/vendor/composer/ClassLoader.php at line 322
  3. Composer\Autoload\ClassLoader->loadClass()
  4. spl_autoload_call()
  5. class_exists() in src/XF/Extension.php at line 172
  6. XF\Extension->extendClass() in src/XF/Mvc/Entity/Manager.php at line 255
  7. XF\Mvc\Entity\Manager->getRepository()
  8. call_user_func_array() in src/XF/Template/Templater.php at line 999
  9. XF\Template\Templater->method() in internal_data/code_cache/templates/l1/s1/public/PAGE_CONTAINER.php at line 462
  10. XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 1315
  11. XF\Template\Templater->renderTemplate() in src/XF/Pub/App.php at line 547
  12. XF\Pub\App->renderPageHtml() in src/XF/App.php at line 1995
  13. XF\App->renderPage() in src/XF/Mvc/Dispatcher.php at line 402
  14. XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 58
  15. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
  16. XF\App->run() in src/XF.php at line 391
  17. XF::runApp() in index.php at line 20

Let me add that I'm using Standard Library 1.1.1 because newer versions of it don't work with my site (I described my issue earlier already). Would you be able to make this new update work also with Standard Library 1.1.1 then? Thank you.
 
1615215560565.webp
Tim And Eric Omg GIF

1615215615852.webp
 

Thanks for your help, as I specified in my post, I'm using Standard Library v1.1.1 because newer updates of it cause issues with the main site I have. I discussed about this issue in one of my previous posts already, but we weren't able to find a solution, so I have to stick with v1.1.1, and as backwards compatibility should be a thing, I'm sure Xon will do his best to help.
 
Looks like you have enough time to waste with annoying gifs, but still not enough to read my post entirely. What's the added value of the post you just wrote?
Upgrade your PHP, I read your post entirely and checked out the other thread.
You can't expect downwards compatibility on this scale.
 
Additional requirements:
XenForo Enhanced Search
ElasticSearch (5.x, 6.x, 7x)
php 7.0+
Standard Library by Xon v1.5+
Browser detection
If installed, require Redis View Counters v2.1.0+
 
  • Like
Reactions: Zig
@Xon looks like there's a conflict with XenCentral Feedback. Is this something I need to report to them?

Code:
Server error log

    ErrorException: [E_NOTICE] Undefined index: title src/addons/XenCentral/Feedback/ReportHandler/Feedback.php:48

    Generated by: Joe Link Mar 8, 2021 at 8:28 AM

Stack trace

#0 src/addons/XenCentral/Feedback/ReportHandler/Feedback.php(48): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/nginx/dom...', 48, Array)
#1 src/XF/Entity/Report.php(86): XenCentral\Feedback\ReportHandler\Feedback->getContentTitle(Object(SV\ReportImprovements\XF\Entity\Report))
#2 src/XF/Mvc/Entity/Entity.php(157): XF\Entity\Report->getTitle()
#3 src/XF/Mvc/Entity/Entity.php(110): XF\Mvc\Entity\Entity->get('title')
#4 src/addons/SV/ReportImprovements/XF/Repository/Report.php(49): XF\Mvc\Entity\Entity->__get('title')
#5 src/addons/SV/ReportImprovements/Search/Data/Report.php(48): SV\ReportImprovements\XF\Repository\Report->svPreloadReports(Object(XF\Mvc\Entity\ArrayCollection))
#6 src/XF/Search/Search.php(79): SV\ReportImprovements\Search\Data\Report->getContentInRange(0, '1500')
#7 src/XF/Job/SearchRebuild.php(57): XF\Search\Search->indexRange('report', 0, '1500')
#8 src/XF/Job/Manager.php(258): XF\Job\SearchRebuild->run(8)
#9 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, 8)
#10 src/XF/Job/Manager.php(116): XF\Job\Manager->runJobEntry(Array, 8)
#11 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#12 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#13 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\UserCriteria\XF\Admin\Controller\Tools), NULL)
#14 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\UserCriteria\XF\Admin\Controller\Tools), NULL)
#15 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#16 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#17 src/XF.php(488): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(58) "https://www.domain.com/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(68) "https://www.domain.com/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(7) "2304486"
  }
}
 
Ok, I managed to update the php version on the main site so I can now use the updated version of this add-on.

Is it normal that each search query now takes 7 seconds to show the results? The site I'm running is the average I'd say.. nothing too big (110k threads and 950k posts). Any suggestions would be greatly appreciated. Thanks!
 
You mean it takes 7 seconds for the auto-suggest to pop-up? No, that is not normal, it should be instantenous. But it probably depends on your server. If you are on a shared hosting or something, it may be that slow though, but it doesn't sound normal.
 
Last edited:
No, sorry if I wasn't clear. I'm not using the auto-suggest, but I'm using a query with returns the latest threads from a few sections.

The structure of the url is:

website.com/search/9999999/?q=download&t=post&c[nodes][0]=12&c[nodes][1]=15&c[nodes][2]=65&c[nodes][3]=142&c[nodes][4]=170&o=date&g=1

The "9999999" part is a hack which prevents the search results from showing a cached search. And the keyword is "download", that's why you can find "q=download". The rest is a list of nodes I want the search to grab the results from, and then they're sorted by date.

This is a button I added in the forum's menu in order to show to my users the latest items from some of our sections, but this keeps taking around 6-7 seconds to show the results.

I'm unsure if the "9999999" part could be the reason of this delay (maybe someone could try such link on their communities as well, to see if it takes a lot to load or not). The rest of the forum loads quite fast, and a "standard" search takes around 2 seconds to complete (which I'm fine with).

I'm on a dedicated server btw, 128 GB of RAM and running on SSD disks.

Thanks again for your efforts to try to help an unlucky guy, I appreciate that.
 
I tested same url on my forum using different node ids and a different query term, and it worked also instantly. My board is 1/10th of your size, so it may be because of that but I think 7 seconds are too long for it to be normal. But I wouldnt know how to find the problem. Maybe check out server error logs for elasticsearch.
 
Quick question, is it worth upgrading from ES 6.x to ES 7.x?
ES 7.12 has some breaking changes which are really annoying to deal with. There is a thread in the enhanced search forum about it.

If ES6 is working for you, staying on it is fine.

@Xon looks like there's a conflict with XenCentral Feedback. Is this something I need to report to them?

Code:
Server error log

    ErrorException: [E_NOTICE] Undefined index: title src/addons/XenCentral/Feedback/ReportHandler/Feedback.php:48

    Generated by: Joe Link Mar 8, 2021 at 8:28 AM

Stack trace

#0 src/addons/XenCentral/Feedback/ReportHandler/Feedback.php(48): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/nginx/dom...', 48, Array)
#1 src/XF/Entity/Report.php(86): XenCentral\Feedback\ReportHandler\Feedback->getContentTitle(Object(SV\ReportImprovements\XF\Entity\Report))
#2 src/XF/Mvc/Entity/Entity.php(157): XF\Entity\Report->getTitle()
#3 src/XF/Mvc/Entity/Entity.php(110): XF\Mvc\Entity\Entity->get('title')
#4 src/addons/SV/ReportImprovements/XF/Repository/Report.php(49): XF\Mvc\Entity\Entity->__get('title')
#5 src/addons/SV/ReportImprovements/Search/Data/Report.php(48): SV\ReportImprovements\XF\Repository\Report->svPreloadReports(Object(XF\Mvc\Entity\ArrayCollection))
#6 src/XF/Search/Search.php(79): SV\ReportImprovements\Search\Data\Report->getContentInRange(0, '1500')
#7 src/XF/Job/SearchRebuild.php(57): XF\Search\Search->indexRange('report', 0, '1500')
#8 src/XF/Job/Manager.php(258): XF\Job\SearchRebuild->run(8)
#9 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, 8)
#10 src/XF/Job/Manager.php(116): XF\Job\Manager->runJobEntry(Array, 8)
#11 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#12 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#13 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\UserCriteria\XF\Admin\Controller\Tools), NULL)
#14 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\UserCriteria\XF\Admin\Controller\Tools), NULL)
#15 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#16 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#17 src/XF.php(488): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(58) "https://www.domain.com/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(68) "https://www.domain.com/admin.php?tools/rebuild&success=1"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(7) "2304486"
  }
}
This looks to be a potentially compatibility issue with XenCentral Feedback, XenForo's report system & how Report Improvements pre-loads bulk reports. It isn't implementing the report title in the way Report Improvements expects.

getContentTitle shouldn't throw an exception like this.
 
@Xon, we’d like to exclude nodes from search. Is this a feature that could be added in the future?
I don't have any immediate plans, but it wouldn't be that hard.

Additional requirements:
XenForo Enhanced Search
ElasticSearch (5.x, 6.x, 7x)
php 7.0+
Standard Library by Xon v1.5+
Browser detection
If installed, require Redis View Counters v2.1.0+
The add-on installer currently only checks for v1.0+, but next update it will correctly check for v1.5+

Is it normal that each search query now takes 7 seconds to show the results? The site I'm running is the average I'd say.. nothing too big (110k threads and 950k posts). Any suggestions would be greatly appreciated. Thanks!
That is very abnormal, but this add-on shouldn't impact this. First step is to see if elasticsearch error logs and the xenforo error log has anything in it.

How many search results do you have XenForo configured to fetch?
Is search configured to a hostname or an IP to connected to ElasticSearch? Try an IP (ie 127.0.0.1 rather than localhost) to rule-out DNS weirdness.
 
The auto-complete in the search navbar only operates on the title, not the message body (aka posts)
Thanks for confirming, I couldn't recall if it searched posts also (I had it disabled following our XF 2.2 updates).

Can it be added to the Wish List? :D
 
I don't have any immediate plans, but it wouldn't be that hard.


The add-on installer currently only checks for v1.0+, but next update it will correctly check for v1.5+


That is very abnormal, but this add-on shouldn't impact this. First step is to see if elasticsearch error logs and the xenforo error log has anything in it.

How many search results do you have XenForo configured to fetch?
Is search configured to a hostname or an IP to connected to ElasticSearch? Try an IP (ie 127.0.0.1 rather than localhost) to rule-out DNS weirdness.

Xenforo didn't log any errors. Elastic Search server is located at: http://localhost:9200/xxxxxxxx and I'm not limiting search results (even though I just tried an advanced search saying to show results from February to March of this year, but the search still took around 7 seconds to complete.

Oh, thanks @sbj for confirming it runs fast on you, so it must be a misconfiguration on my end for sure. Pheraps I should tune my.cnf once again, even though on normal searches it's a lot faster so I'm not sure it's related to mysql at all.
 
Xenforo didn't log any errors. Elastic Search server is located at: http://localhost:9200/xxxxxxxx and I'm not limiting search results (even though I just tried an advanced search saying to show results from February to March of this year, but the search still took around 7 seconds to complete.
There are 3 components that could be causing the delay;
  • Query time for elastic search (http request to elasticsearch)
  • mysql fetching results (mysql query)
  • php processing results
What value does "Maximum number of search/find new results" have? Try setting it to 400-500 or less
 
@Xon
for future customners, edit compatible versions to 2.2 too, in addon explanation here on xf site ;)
Compatible XF 2.x versions 2.1
 
Top Bottom