• Hi Mikko,

    To start, I have the “relevanssi_orderby” filter included to prevent conflicts with the post ordering plugin I’m using, which looks to be working great.

    In my “Searching” tab I have Content at 5,000 weight, Titles at 30,000 weight, and the others at the default weight.

    We have an “attorney” post type with the attorney’s name as the title. Three of the attorneys have the same last names: (these aren’t the exact names, but they’re very similar)

    – John C. Harres, Esq., MA
    – Michael Harres
    – David Harres

    When searching for “john harres”, Michael Harres always comes up first, then John C. Harres, Esq., MA, and then David Harres. I’m wondering why John C. Harres, Esq., MA doesn’t come up first as it’s obviously the closest match.

    I ran the search for “john harres” in the admin search and it’s the same order. Both John C. Harres, Esq., MA and Michael Harres have the exact same score of 2202254.58.

    Thanks!

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

    (@msaari)

    That’s weird, and some information is missing here. If the posts are getting the same weight ranking, they’re considered equally valuable, ie. both have all search terms exactly as many times. This, obviously, can’t be true.

    So, it seems to me when you search for “john harres”, “john” isn’t considered at all for some reason. Is the post indexed correctly? If you look at it with the Relevanssi debugger (Settings > Relevanssi > Debugging), does the word “john” appear under “post title”?

    If you search just for “john”, does the John Harres post come up first?

    Thread Starter gavin310

    (@gavin310)

    Your comment about “john” not being considered at all made me think of something. I should’ve mentioned that the person’s actual first name is 3 letters, not 4 like “john”. (I changed the names a bit because these people definitely Google themselves, as do their clients.) Does Relevanssi maybe ignore 3 letter keywords?

    Thank you for the quick support!

    Plugin Author Mikko Saari

    (@msaari)

    Three letters is the default minimum word length, so if you haven’t adjusted it, three-letter words should be included.

    But try searching for the first name only. What happens? Does the name appear in the debugger?

    Thread Starter gavin310

    (@gavin310)

    Ok got it! Thank you! The first name wasn’t showing up in searches, so then I realized that the person’s first name is actually one of the stopwords (their name is May). I removed the stopword, reindexed, and now it shows up, although it showed up very far down the list. I had to change the weight of titles to 100,000 in order for their result to show up first, although the other title matches with last name matches still show up further down a bit. I saw that in Relevanssi premium you can have Content Stopwords, so I could ignore matches for “may” in the content and only search for it in post titles, which I think would give the results we want, so I need to ask the boss about upgrading ?? Thanks again for your help!

    Plugin Author Mikko Saari

    (@msaari)

    Yeah, “may” is not a very powerful search term. Content stopwords would be a top-notch solution here, it’s created exactly for cases like this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Results with title matches are not in expected order of relevance’ is closed to new replies.