Search Results Are Not What Is Expected.
  • Hi,

    While the seach function it works generally fine, it does not list some articles with specific keywords. Where to search to find what's wrong in my situation ?

    My code is (campsite 3.4)

    {{ list_search_results name="results" order="byPublishDate desc" unset_section=true unset_issue=true length=9 }}


    {{ /list_search_results }}
  • 6 Comments sorted by
  • Hi,

    Can you please provide more information on this? like specific examples of the bad behavior or missing results.

    Searching is all about indexation, if some keywords are not indexed then Newscoop will deliver no results for those.

  • Thanks Holman, I was off from my office for a few days.

    I am using campsite 3.4 and not newscoop but the problem is fairly simple. I use for example a specific keyword for my article, lets say XYZ123. 

    Now using the search box, i enter XYZ123 and the result is "no articles found".

    I am using Greek alphabet since the web site is Greek and the offending article is a previous month issue, all including in one publication.

    Can you please guide me to the specific php files inside the source code, that are responsible for the indexing and sql queries for this purpose ? I want to verify the final sql query that makes the search inside the mysql tables.

    Best Regards,
    George
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    make sure that indexing script (campsite-indexer) is enabled in cron tasks

  • Hi,

    I have never touched this thing. Where to find this option ? I can not find it under the System Preferences.

    George

    PS1: The option "Run cron tasks externaly" is selected to "No"
    PS2: I found that file unde the bin folder. Should I enable from my cpanel to cron this file ?
    Post edited by sdancer75 at 2012-04-17 07:02:30
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    sdancer75 said:

    The option "Run cron tasks externaly" is selected to "No"


    shared hosting? Ok, then indexer should work.

  • Reply to @Andrey+Podshivalov: Thank you for your reply.

    Its a VPS server. Anyway I created under the cpanel a cron task that shows at /bin/campsite_indexer.

    I opened this file but with a quick look It seems that it updates only the statistics.

    The main code inside the file looks like the following code. Do you think that the indexing is the problem ?

    // gets the arguments from command line, if any
    if (is_array($GLOBALS['argv']) && !empty($GLOBALS['argv'][1])) {
        $option = explode('=', $GLOBALS['argv'][1]);
        if ($option[0] != '--conf_dir') {
            usage();
            exit(0);
        }

        $conf_dir = (!empty($option[1])) ? rtrim($option[1], '/') : '';
        if (empty($conf_dir)) {
            usage();
            exit(0);
        }
    } else {
        $bin_dir = dirname(__FILE__);
        $conf_dir = preg_replace('/bin$/', 'conf', $bin_dir);
    }


    // runs the script
    //update_statistics($conf_dir);