change search order

This topic contains 4 replies, has 3 voices, and was last updated by  Kiran 5 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #462423

    Oscar Borja
    Expired Member
    Post count: 13

    Good afternoon.
    How can I change the order in which the search is done?
    In other words, I would like the search to be carried out first by title, then by tags, then by category and then by description.
    Thank you

    #462427

    Alex Rollin
    Moderator
    Post count: 27815

    Can you say more about what you want to achieve? I don’t know your comfort level with php/sql but if this is a customization you are interested in we might be able to point you in the right direction.

    #462542

    Oscar Borja
    Expired Member
    Post count: 13

    Yes, I want to be able to implement a different search order … to obtain the results a little closer to the request of our local users. I want to be able to implement the searches in phases … first bring the results that match the most by title, then the ones that match the most by tags. I have good level in php and sql, but I may need some documentation for development.

    First I wanted to find out if that functionality was already implemented.
    Thank you

    #462605

    Alex Rollin
    Moderator
    Post count: 27815

    No, but I will flag your question for the developers in case they have any ideas.

    Your first and best resource is the forum history. Try search here for examples of “change search” or “search query”.

    I don’t think we can help with the multi-step aspect of what you are talking about, but the developers might be able to point you in the right direction for searching “only tags”, for example.

    The developers will get back to you here, feel free to write any more information you can provide.

    #462672

    Kiran
    Moderator
    Post count: 7069

    Hello Oscar,

    We are sorting searched results based on priority rank. It calculates rank by sum of title match, featured, exact title, description match etc. See https://github.com/GeoDirectory/geodirectory/blob/master/geodirectory-functions/listing_filters.php#L476 in function geodir_posts_orderby()

    Matching & calculation for fields here: https://github.com/GeoDirectory/geodirectory/blob/master/geodirectory-functions/listing_filters.php#L290 in function geodir_posts_fields()

    You can use hooks to achieve that you are asking.

    Thanks,
    Kiran

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount