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

    (@msaari)

    SearchWP Live Ajax Search works with Relevanssi. Autocomplete is not coming to Relevanssi, at least not in the near future, so that’s your best bet at the moment.

    Hello,

    I need also this feature. I would like to develop it for relevanssi. Here’s how I would like to do it :

    • If someone begins to type a word in the serach box (after 3 characters for instance), an ajax request is sent (I will use jQuery for that)
    • The php file launched will have a look to the wp_relevanssi table and find the words beginning with the typed characters
    • each time a character is added, the same request is done, the list of suggestion is each time updated.

    Is this the best way to do it?

    Thanks in advance.

    • This reply was modified 8 years, 5 months ago by jojaba.
    Plugin Author Mikko Saari

    (@msaari)

    Yes, that’s a way you can do that. I personally prefer showing search results instead of completing words, but if that’s what you want, this is the way I’d do it.

    Thanks for that answer Mikko.
    How about first getting all the words in the relevanssi table (php), and keep them in an JS array for all pages? this would avoid the multiple ajax requests and save bandwidth don’t you think? Or is it a bad idea because the list of words is probably too big?

    • This reply was modified 8 years, 5 months ago by jojaba.

    I just found a nice tool made By Lea Verou, called Awesomplete. I really like what she does, it is mostly simple and lightweight. I usually don’t like dependencies (except if it is loaded by default like jQuery for WordPress), but for Lea’s work I make an exception without worrying. ??
    Awesomplete page.
    Using this widget, I will have options for the words load :

    • loading the list on server side before page is sent to the browser,
    • or loading with ajax technlogy.

    Your opinion?

    • This reply was modified 8 years, 5 months ago by jojaba.
    • This reply was modified 8 years, 5 months ago by jojaba.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Autocomplete?’ is closed to new replies.