• anefarious1

    (@anefarious1)


    I would like the plugin to only return results that contain a search term more than 1 time. In other words, if a post only has the search term once then I do not want that post in the results. Is this possible? Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ajay

    (@ajay)

    Potentially yes.

    Conceptually, you’ll need to write a function to filter bsearch_posts_where where you’d add another WHERE clause which would check if the count is twice.

    To be frank, it’s a bit beyond me in terms of the exact code for this.

    Thread Starter anefarious1

    (@anefarious1)

    Thanks for replying Ajay. I think this is a great feature to consider and I’ll tell you why. If a search term is used only once in an article, there’s a good change that the article is not relevant to what the user is actually looking for.

    Limiting the results to articles that mention the term more than once would return only the most relevant results.

    Plugin Author Ajay

    (@ajay)

    From my research, one point that contributes to the ranking is the number of times a word is repeated. I’ve not been able to figure out a way to only return posts which have the word count is specifically considered.

    Thread Starter anefarious1

    (@anefarious1)

    Thanks Ajay. Hopefully it can be done, someday ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Limiting Results’ is closed to new replies.