Relevanssi - A Better Search
Why Relevanssi fails to index number? (4 posts)

  1. greattest
    Posted 2 years ago #

    I found a strange problem.
    I have added a custom field to Relevanssi search scale and one value of this field is 5840-01-7 5-(Hydroxymethyl)furfural. When I use furfural or other letters to search, the result includes this value without any problem. But when I search the number such as "5840" or "58", it does not display in the search result.

    I try some other fields by adding some number to them, the same problem happens.
    What is wrong with it?


  2. Mikko Saari
    Plugin Author

    Posted 2 years ago #

    Relevanssi sees 5840-01-7 5-(Hydroxymethyl)furfural as "5840 01 7 5 Hydroxymethyl furfural" and after minimum word length is applied, "5840 Hydroxymethyl furfural".

    Searching for 5840 should work, Relevanssi doesn't see much difference between numbers and letters. I just tested this - if I enter "5840-01-7 5-(Hydroxymethyl)furfural" in a custom field and search for 5840, Relevanssi does find the post.

  3. greattest
    Posted 2 years ago #

    Dear Mikko Saari,

    Thank you for your response.
    However, under my test, Relevanssi doesn't index any numbers even your mentioned 5840, I don't know whether there is any place that I made wrong setting.

  4. Mikko Saari
    Plugin Author

    Posted 2 years ago #

    That must be something else, then, as Relevanssi by default doesn't make any difference between numbers and letters. I'd check the database (wp_relevanssi) to make sure if the problem is in indexing or in searching – are there any numbers (in column "term") in wp_relevanssi table? Check that and you're a bit wiser about the problem.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Relevanssi - A Better Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic