This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Ordering results by rating/review

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Ordering results by rating/review

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #25263
    danielecelsa07danielecelsa07
    Participant

    Hi,

    I am looking for a custom way to sort the results after a search with Ajax Search Pro.

    I see I can choose by Relevance, Title, Date, Random, Custom Field.

    I am using SiteReview to dynamically add rating and review to each of my Custom Post type, and I would like the results to be shown based on the rating.
    Is this possible? If yes, how?
    FYI, SiteReview provides a meta data value called ‘_glsr_ranking’ that I guess would be useful in order to sort the results as I need. Is there a way to sort the results by Meta Data?

    By the way, how ‘by Relevance’ would work in ordering the results?

    Many thanks,
    Daniele

    #25264
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Danielle,

    I cannot tell for sure, but the fact that it’s using a custom field is a very good news. The Meta Data is the same as a custom field, so using the custom field solrting option is the way to go.
    I would try these configurations:
    – Config1: https://i.imgur.com/btObyBc.png
    – Config2: https://i.imgur.com/NIFOil0.png

    Let’s hope that either of these work, and the meta field does not contain a serialized object of any sort, but a numeric/string value.

    Relevance ordering is a bit complicated to explain fully, but it calculates a relevance number based on the phrase occurence in the selected fields. Some of these factors can be adjusted under the Relevance Options panel.

    #25265
    danielecelsa07danielecelsa07
    Participant

    Thanks Ernest, Config2 worked 😉

    Many thanks,
    Daniele

    #25268
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #25269
    danielecelsa07danielecelsa07
    Participant

    You cannot access this content.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Ordering results by rating/review’ is closed to new replies.