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

    (@msaari)

    The way Relevanssi handles punctuation means that Relevanssi indexes N-(4′-Chlorobiphenyl-2-yl)-2-oxo-1,2-dihydropyridine-3-carboxamide as N 4 Chlorobiphenyl 2 yl 2 oxo 1 2 dihydropyridine 3 carboxamide and after removing parts that are too short, it becomes Chlorobiphenyl oxo dihydropyridine carboxamide. So no wonder it is a bit inaccurate.

    The punctuation removal can be changed, but I’m not sure what is the best approach here. Looks like your posts don’t really have any text in them outside the titles and the few fields? In that case I think you might try removing the punctuation control altogether.

    Add this to your theme functions.php and then rebuild the index:

    remove_filter('relevanssi_remove_punctuation', 'relevanssi_remove_punct');

    This may make finding results too hard, but that depends a lot on how your users are actually searching for these items. You know that better than I do – is it likely someone will actually use the complete, specific name without any errors? Or will people search just for parts of the names?

    Thread Starter bilslandlewis

    (@bilslandlewis)

    Thanks for the information, this does make sense, I will need to find out more from my client on how users would expect to find a product as it’s quite a technical subject.

    Cheers – Lewis

    Thread Starter bilslandlewis

    (@bilslandlewis)

    Hi Mikko
    Turns out clients would search using hyphens, added the fix and it’s all working perfectly now, thanks for all your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Result accuracy’ is closed to new replies.