• Resolved alrioart

    (@alrioart)


    How do I sort my default search results by “Newest”?
    For example, the band King Gizzard has many records and on the page I want the newest one I added to the site to come up first.
    Also, if you look at this page I linked to, the search was for “King Gizzard” and the search result lists “King Crimson” down the page before the other “King Gizzard” results.
    Can you help?

    The page I need help with: [log in to see the link]

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

    (@mihail-barinov)

    Hi,

    To order search results by date please use this code snippet.

    About “King Gizzard” search – perhaps that product with “King Crimson” has some “Gizzard” words inside its description and that is why he appears so high. Plugin also counts the number of repeats of search query words inside the product content and sets some relevance score according to that.

    Regards

    Thread Starter alrioart

    (@alrioart)

    Thanks for the code I should have looked there. Great page. I bookmarked it.
    Adding that code to my code snippets *did* put the King Gizzard in order by newest BUT, it also included other products in the Search Results above King Gizzard, like Radiohead in the #1 spot because it has the word “King” in it (and it was the newest product added. And the King Crimson descriptions do not mention Gizzard.

    Plugin Author ILLID

    (@mihail-barinov)

    So by default when you are searching for “King Gizzard” plugin will show all products that have “King” OR “Gizzard” OR both of them. If you want to show only the products that have both search words inside its content – you need to use the PRO plugin version. It has a feature to use AND search logic instead.

    Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How To Sort Results by Newest’ is closed to new replies.