Relevance sorting

This topic contains 12 replies, has 2 voices, and was last updated by enoversum enoversum 7 years, 3 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #4655
    enoversum
    enoversum
    Participant

    Hi there,

    I have just gotten another client to buy your delicious search plugin :). However, we have a slight problem as regards to weights of relevance.

    We currently have the case that even though an (older) post has a search term in its title and multiple times in the content, other posts which only have one occurance of the term somewhere in the content field, but are younger are preferred and shown on top of my search results. The title itself does not seem to be the problem, since it highlights the search term rightly.

    As an example:

    We have an article from 2014 with the title “AJAX is king”, AJAX is being mentioned 10 times in the article. Plus an rticle from May 5th titled “Javascript is really fun” which has only one occurance of AJAX in the content itself. The newer article is being displayed on top of search results, while the other is e.g. at #5.

    In the relevance options I set the title to a weight of 10, while everything else only gets a 1. No full-text search is activated. Unfortunately, it seems to override these settings and does only care for the date sorting. Do you have any idea on what the problem could be?

    All the best and thanks

    Eno

    #4656
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Eno!

    Thank you very much for recommending my plugin!

    The secondary ordering kicks in when the relevance is exactly the same. The problem is that the search does not count the occurrences of the words (it could, but it would kill the performance), so in this case the occurrence does not matter.

    Fulltext might take this into account, but then again the relevance values are not adjustable there.

    I’ll try to consult with the folks on stackoverflow to see if anyone knows an efficient way of counting string occurrences without inflicting the performance greatly. This would definitely benefit the search greatly.

    Until then, the only solution I can suggest is to use the priority submenu to prioritize more inportant posts.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #4657
    enoversum
    enoversum
    Participant

    Hi Ernest,

    thanks for your speedy reply. Let me get this right: I told your plugin to measure headings as 10 and content as 1. Nonetheless it prioritises posts that are newer that do NOT have the term in its title as opposed to an older one that has the term in its title (like in my AJAX example).

    I don’t bother much for the occurence of terms, my priority is to have posts on top that have the term in its title (that’s what the relevance settings are for I thought) ;).

    All the best

    Eno

    #4658
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Oh, I see, let me check the code then.

    What happens if you only type in 1 word? Like “ajax” or something else. In case of search terms with multiple words in it, does it give you the same result order if you change the words order? Like “ajax javascript” opposed to “javascript ajax” and similar? I’m very curious.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #4662
    enoversum
    enoversum
    Participant

    Hi Ernest,

    it’s exactly one word that I am typing in – AJAX. That’s when the right sorting already fails, no combination of keywords in place :).

    Search term: AJAX

    Article one (older) named: “AJAX is king” (AJAX appears in content multiple times as well)
    Article two (newer) titled: “Javascript is really fun” (AJAX appears once in content only)

    The second one is on top of the list as opposed to the result wheighting options. Here the secondary sorting (via date) seems to kick in, which is kind of strange to me – or is it meant this way?!

    All the best

    Eno

    #4663
    enoversum
    enoversum
    Participant

    Maybe it is easier with a concrete example: Just go to http://www.testboks.com/testpress/ (my testing area) and type in “Telekom” or “Akamai” – on both terms you don’t get the posts that have the term in its title onto the top, but ones that are newer and have the search term in their content are on top of the results.

    #4664
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    It looks like that on your test server the fulltext search class is called, at least that’s what I see from the response content. This might be an unknown bug yet, I don’t know.

    Would you please try to open up the Fulltext search settings submenu and save the options? You can even change them a few times to make sure the input values change. I’ve checked the relevance code, but it looks all right to me, so this might be the problem I guess.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #4665
    enoversum
    enoversum
    Participant

    Hi Ernest,

    that did it! Although I did not activate fulltext search (see attachment) it was enabled by default, even though it showed it did not (see attachment :)). When you now try your search it is working again… I wouldn’t have had any idea this could be the problem! So it seems like a bug, yes :).

    All the best

    Eno

    Attachments:
    You must be logged in to view attached files.
    #4667
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    That’s great news! I’m sure I will be able to find the cause now and fix it as well. Thank you!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #4668
    enoversum
    enoversum
    Participant

    You’re welcome so far :). Just let me know when you found a fix!

    #4672
    enoversum
    enoversum
    Participant

    Hey Ernest,

    just one thing, not really related to this one. We have a post that has “360dialog” in its title. I didn’t activate “Show exact matches only”, but when I search for 360 the post does not show, with 360dialog it does. Is that by design? Or what is meant by exact matches?

    Thanks again

    Eno

    #4673
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    No, it should show, unless the keyword logic is set to “OR with exact word matches” or “AND with exact word matches”. In that case “360” does not mach “360dialog” as a single word. Same might happen with fulltext search, as it usually ignores numbers. If the result does show up for “0dialog” or “60dialog” and the keyword logic is not set for exact word matches then most likely fulltext is being used.

    Exact matches mean, that in case of multiple keywords they are treated as one word and there is no search query with them separately.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #4674
    enoversum
    enoversum
    Participant

    Hi Ernest,

    yes, that was the problem, I had it set to “AND with exact word matches”. Changing it to “AND” helped, thank you! The settings got a little overcrowded, so I just missed out on this setting I suppose :).

    All the best

    Eno

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.