Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Search bar extremly slow

Hello
In this official forum of vanilla, the search bar works incredibly fast, 1.2 seconds for any search.

On my forum every search request even five minutes or more.
I had to disable it, if more users search simultaneously the server crashes .

I have about 200 active users at once, so it is impossible to use.

How to solve?
Thank you

Comments

  • grep is your friend.

  • Thank you for the answer
    Its not look so easy
    Could you tell me the difference between the full and the lite version?

  • Light is light on interface, it doesn't have so many search options, but in terms of indexing makes no difference.

    Yes it is non-trivial to set up. But worth it for your load.

    grep is your friend.

  • edited January 2017

    I'm following the guide, i'm stuck on step 8 (https://open.vanillaforums.com/addon/sphinxsearch-plugin)
    I have downloaded the .deb package not the Source tarball (tar.gz)
    I'm on ubuntu 16.04 x64

    Do you know whats the problem?

    I have the following error:

    root@vps****:~# /usr/bin/indexer --all --config /etc/sphinxsearch/sphinx.conf
    Sphinx 2.2.11-id64-release (95ae9a6)
    Copyright (c) 2001-2016, Andrew Aksyonoff
    Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
    
    using config file '/etc/sphinxsearch/sphinx.conf'...
    indexing index 'test1'...
    ERROR: index 'test1': sql_query: Table 'vanilla5.documents' doesn't exist (DSN=mysql://root:***@localhost:3306/vanilla5).
    total 0 docs, 0 bytes
    total 0.002 sec, 0 bytes/sec, 0.00 docs/sec
    indexing index 'test1stemmed'...
    ERROR: index 'test1stemmed': sql_query: Table 'vanilla5.documents' doesn't exist (DSN=mysql://root:***@localhost:3306/vanilla5).
    total 0 docs, 0 bytes
    total 0.000 sec, 0 bytes/sec, 0.00 docs/sec
    skipping non-plain index 'dist1'...
    skipping non-plain index 'rt'...
    total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
    total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
    
  • edited January 2017

    UPDATE

            using config file '/etc/sphinxsearch/sphinx.conf'...
            WARNING: key 'charset_type' was permanently removed from Sphinx configuration. Refer to documentation for details.
            WARNING: key 'enable_star' was permanently removed from Sphinx configuration. Refer to documentation for details.
            WARNING: key 'ondisk_dict' was permanently removed from Sphinx configuration. Refer to documentation for details.
            WARNING: key 'port' was permanently removed from Sphinx configuration. Refer to documentation for details.
            WARNING: key 'max_matches' was permanently removed from Sphinx configuration. Refer to documentation for details.
            ERROR: unknown key name 'compat_sphinxql_magics' in /etc/sphinxsearch/sphinx.conf line 255 col 27.
            FATAL: failed to parse config file '/etc/sphinxsearch/sphinx.conf'
            root@vps362724:~# /usr/bin/indexer --all --config /etc/sphinxsearch/sphinx.conf
    

    I've deleted wornings key from sphinx.conf
    Also 'compat_sphinxql_magics'

    Now i'm indexing[..]
    Is this the correct way to go?

  • On step 3 i'm getting the following error:

    Call to protected method Gdn_Validation::AddValidationField() from context 'SphinxSearchPlugin'

    I'm unable to set cron tasks, any idea?

  • edited January 2017

    Full error:

    `Fatal Error in SphinxSearchPlugin.Controller_InstallWizard();
    
    Call to protected method Gdn_Validation::AddValidationField() from context 'SphinxSearchPlugin'
    The error occurred on or near: /var/www/html/vanilla5/plugins/SphinxSearch/class.sphinxsearch.plugin.php
    346:                     }
    347:                     break;
    348:                 case 'Config': // AKA cron setup
    349:                     $Sender->SetData('NextAction', 'Config'); //in case it fails
    350:                     $this->ConfigurationModel->Validation->AddValidationField('Plugin.SphinxSearch.IndexerPath',$_POST);
    351:                     $this->ConfigurationModel->Validation->AddValidationField('Plugin.SphinxSearch.ConfPath',$_POST);
    352:                     $Sender->Form->Save();
    353:                     if (!$Sender->Form->Errors()) {
    354:                         $SphinxAdmin->InstallCron();
    Backtrace:
    [/var/www/html/vanilla5/library/core/class.plugin.php:336] SphinxSearchPlugin->Controller_InstallWizard();
    [/var/www/html/vanilla5/plugins/SphinxSearch/class.sphinxsearch.plugin.php:234] Gdn_Plugin->dispatch();
    [/var/www/html/vanilla5/library/core/class.dispatcher.php:313] SphinxSearchPlugin->PluginController_SphinxSearch_Create();
    [/var/www/html/vanilla5/index.php:44] Gdn_Dispatcher->dispatch();`
    
  • mcu_hqmcu_hq yippie ki-yay ✭✭✭

    @giacomosilli I've updated the download from the add-on site to reflect that of github. You can see the fix here: https://github.com/mcuhq/SphinxSearchPlugin/commit/ad894e9d5a16e37c2c687eadae8e43699fa50696

Sign In or Register to comment.