Search module, problems with indexing

edited February 2015 in Modules
Hello!
I have problems with a search module, namely the indexing of site:
The module is installed and running but does not index anything, I tried to index through CLI, select pages to be indexed manually, prescribed route to the site map, changed config and the result is the same, I don't get any errors ( and success reports too ), if I create a searchable index(fuel/tools/search/create) and put page content, it appears in the search results, if I do reindex (fuel/tools/search/reindex), search data disappears...
during indexing (Search -> Reindex) in console appears message:
index_site
fuel/tools/search

status - 200
response - <pre style="text-align: left;"></pre>

The message is always the same and does not change if I indexed the entire site or a single page (runtime also does not change)...

Please tell me what could be the problem.

p.s. Should indexed content appear in the admin (fuel/tools/search) if successful indexed entire site?

Comments

  • edited February 2015
    Normally if nothing gets indexed, it has to do with the delimiter values set in the config. I will normally copy the config/search.php files to fuel/application/config/search.php which allows me to make configuration changes outside of the fuel/modules/search folder. Then in the fuel/application/config/search.php, change the delimiters value to an HTML element that may exist in your page (you can use xpath or the HTML of the opening element). There are also title_tag, excerpt_tag and language_tag delimiters that can be set but normally the default will work for basic indexing. Let me know if a change to that fixes your problem.
  • edited 6:34PM
    I originally moved files search.php config to fuel/application/config and serch.php view to application/views, now I changed in config delimiter values also changed title_tags, and other things in the end it worked when deleted all $config['search']['settings'], namely deleted not cleaned.
  • edited 6:34PM
    So to confirm, you copied the config to fuel/application/config/search.php, copied over the search view file to fuel/application/views/search.php and changed the delimiters in fuel/application/config/search.php and it worked correctly?
  • edited 6:34PM
    Yes, I copied files and changed delimiters.
    The problem disappeared when I removed this 3 lines:
    $config['search']['settings']['user_agent'] = array(); $config['search']['settings']['delimiters'] = array('default' => '<div id="content">'); $config['search']['settings']['query_type'] = array('type' => 'select', 'options' => array('match' => 'match', 'match boolean' => 'match boolean', 'like' => 'like'));

    If leave at least one, get error:

    Message: DOMXPath::query() [domxpath.query]: Invalid expression

    Filename: libraries/Fuel_search.php

    Line Number: 763


    Tried to change value:
    $config['search']['delimiters'];
    $config['search']['excerpt_tag'];
    $config['search']['settings']['delimiters'];

    Regardless of the values got this error.
  • edited 6:34PM
    I see. Yes, those can be commented out if you are not configuring it under the Settings area of the CMS. I've pushed a change to have that commented out by default to avoid that confusion going forward.
  • edited 6:34PM
    Thanks Admin!
  • edited 6:34PM
    New problem with search indexing:

    It was found that search does not index pages with ukrainian( or russian) language correctly...
    It indexes the page, but correctly displayed only english or numeric content, example:
    2014 , , , , 105 000 . , , , 20- DIY. 1500 . , , .
    How can I solve this problem?
    p.s.
    Encoding of content is UTF-8
  • edited 6:34PM
    There is a Fuel_search::clean() method that is used to clean the content after it has been indexed. By default, it uses a function called zap_gremlins which is a function found in the MY_string_helper. The search.php config file has a reference to the "cleaning_funcs" that can be applied. I'd first try removing that to see how it indexes. If there are still problems, then a look into the Fuel_search::clean() method may be necessary (such as looking at the $UNI->clean_string($content) line in that file).
  • edited 6:34PM
    Thanks, Admin!
    I removed zap_gremlins func from search $config['cleaning_funcs'] and it worked fine.
Sign In or Register to comment.