• Daer reader,

    I am looking for a awesome searching form to use on my website. It seems to relevanssi meets my ideas.

    For example please see the below link. On the right side you have a search form which I would like to use for the website.
    https://www.gobicycletouring.com/category/france/2

    Offcourse the results needs be based on relevance.
    Features as mentioned below will be great;
    – range slider
    – widget for show latest search or top search
    – (google) map search
    – keyword suggestion
    – option to exclude certain posts for the search

    Can you please share your ideas what is possible when using your plugin.

    https://www.ads-software.com/plugins/relevanssi/

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

    (@msaari)

    Relevanssi doesn’t help you create those range sliders, but if you have them, Relevanssi can take the parameters and use them. Depending on how everything is set up, handling those parameters may require lots of programming, a little bit of programming or no programming at all. Custom field parameters require the most work; you need to take all the parameters from the sliders and format them into nice meta_query objects for Relevanssi to digest.

    Relevanssi doesn’t have a widget for showing latest searches or top searches, but does have logs that store all the searches, so you can create the widget yourself, showing exactly the data you want, the way you want it and with the filters you need (allowing users to display data on your site without moderation is not a good idea in most cases).

    As for map search, it depends on what exactly do you mean with that.

    Relevanssi doesn’t have keyword suggestion as you type, but it does have a “did you mean” feature to correct typos. In the Premium version, that feature is quite good.

    As for exclusions and restrictions, Relevanssi is very strong in that. Premium has a simple check box on every post edit page you can use to exclude that post from the index, and you have 100% control over what is indexed and what is displayed in the search.

    Thread Starter world2cycle

    (@world2cycle)

    Thanks ??

    I’ve been thinking about building a keyword suggestion UI on top of Relevanssi. Haven’t started but here’s what I’m thinking in case you want to give it a go @world2cycle.

    1. Polling the wp_relevanssi_log table, pull any log entry that has more than, say, 5 in the hits column. Create a JS object with it (keeping the hits number).
    2. Make a JS array from that object that is (somehow) sorted by 1) number of hits and 2) number of occurrences within the log. That would make the list sorted by both usefulness (# of hits) and popularity (# of occurrences).
    3. Use something like Awesomeplete/Typeahead/whateverlibrary to actually offer the suggestions from the JS object.
    4. Can also pull post titles, tags, categories, etc to put into the same JS object the autocomplete library will pull from. Typeahead actually has some create facilities for using multiple JS objects and presenting them separately within the suggestions so you could, for example, have keywords, posts and tags all separated.

    I don’t think it would actually be all that hard I just haven’t found the time to try it out.

    As far as a Google Maps search, you can just do that with Javascript within your search results template. Probably easiest to include the script block directly within the results template (or included template part) because then you’ll have access to the searched term.

    Using Google’s example code, replace performSearch().request{}.keyword (set to “best view” in the example) with <?php the_search_query(); ?>. There are other ways to use the maps API for searching, depending on what you want to do, but presuming you’ve including the HTML and API JS properly, that orta ‘just work’. It will appear a little after the local results appear but gmaps searches are blazing fast on the whole.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Features possible using this plugin’ is closed to new replies.