WordPress.org

Support

Support » Plugins and Hacks » Relevanssi - A Better Search » [Plugin: Relevanssi – A Better Search] bug/error notice with short terms

[Plugin: Relevanssi – A Better Search] bug/error notice with short terms

  • when setting up “minimum word length” to index to anything above 1, and then trying to search shorter term, it returns
    1. this error notice
    Notice: Undefined variable: doc_weight in /var/www/vhosts/money.cz/httpdocs/wp-content/plugins/relevanssi/relevanssi.php on line 1309
    2. no results at all – imho it should then fallback to standard search.

    when setting it to 0 it returns then the same error (imho it should count with “1” as minimum).

    Also for unknown reason it began very strange weighting in last days and i do not know how to analyze what is going on – e.g. http://money.mediacentrum.cz/?s=money+S3
    I had to set-up weight of TITLE to 50!!! so that the page with slug money-S3 (http://money.mediacentrum.cz/money-s3/) with Money S3 in title and H1 and in text appears on first page (5th position), otherwise it is somewhere far far lower. Is there any way how i can see the actual weights for each article for the query?

    http://wordpress.org/extend/plugins/relevanssi/

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    @msaari

    Yeah, that undefinied variable is already on my to-do list.

    You can use the “Show breakdown of search hits in excerpts:” option to show the total score, just put “%score%” in the breakdown field.

    Looks like both “money” and “s3” are very common terms on your site, and in that case the results can be pretty much anything. Setting the title weight to 50 (which is not that huge a number, really) is probably the best idea.

    Relevanssi doesn’t care about HTML markup (which might be a good idea, but requires so much work I don’t think it’s going to happen any time soon) or page slugs (that would be easier, and I think I’ll take a look at indexing page slugs).

    I’ll have to fix Relevanssi to behave when minimum word length is set to 0 (count it as 1, yes). I don’t know about the fallback, though – somewhat complicated, and the user can always add a “your search term was too short” error notice to the search results page if necessary.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] bug/error notice with short terms’ is closed to new replies.
Skip to toolbar