• Resolved gavin310

    (@gavin310)


    We have two post types: attorneys and articles. Our attorney post titles are the person’s name, for example “John Doe, Esq., MA”. Many of the article posts are written by this same person and his name is mentioned in the article content frequently. When searching for “john doe”, the articles always come up first and the attorney post result is far down, even though the post title is “John Doe, Esq., MA”.

    In the “Weights” section I’ve tried adjusting “Titles” to a very high number… first 10 (and then rebuilt the index because I don’t know if it’s needed or not), then 30, and then 50, but it’s always the same. The attorney post is always far down in the results.

    Ideally I’d like the attorney matches to always show first, but I don’t know if that’s possible. I’d at least like title matches to have more weight than content matches, but that doesn’t seem to be working. Any ideas on how to fix this?

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

    (@msaari)

    The first thing to check is to see if the results are actually in the order of the most weight first. If you run the search in the Relevanssi admin search (Dashboard > Admin search), you’ll see the weights assigned to the posts. Are the results in the descending order by weight?

    50 is not very high. 5000 is. Try bigger numbers. After adjusting the numbers, check the admin search: do the weights change?

    (You don’t need to rebuild the index after adjusting anything on the Searching tab; only the settings in the Indexing tab require reindexing.)

    Thread Starter gavin310

    (@gavin310)

    Thanks! That helped me track down the issue. In the admin search the search results are great, even without changing the weights. (They are ordered by the Score from highest to lowest.) The site search results are the same results but in a different order. Turns out it’s the “Real Custom Post Order” plugin that is reordering the search results.

    Plugin Author Mikko Saari

    (@msaari)

    In case someone else is looking for the answer, here’s a way to solve this: https://www.relevanssi.com/knowledge-base/issues-post-order-plugins/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Title w/ exact phrase match being shown much further down than content matches’ is closed to new replies.