Skip to content
Advertisement

Apache Solr search autocomplete

I’m using apache solr search engine to implement my site search. I able to setup the Apache Solr Search module and now my search is working as I need. Now I trying to implement an search autocomplete with the help of Apache Solr Autocomplete module, but the thing is I’m trying to show the node titles as suggestion list rather than keywords. Finally I found this tutorial and tried that, I seems to be working but now I’m stucked with an AJAX HTTP error (500). And I found 4 error messages in my drupal error log:-

JavaScript

I guess this tutorial almost doing the job we looking for, unfortunately they no longer providing support or any response to the comments. Is anyone able to figure out a way to implement this cool functionality? Even if anyone come up with a licence version, I’m happy to buy. Thanks guys.

This is the current Apache Solr Autocomplete look like (below image), In this suggestion list they listing the search keywords from the search index. What I’m trying to do is listing the node titles in this suggestion list.

enter image description here

Advertisement

Answer

This is just a trick, not the not the correct way, but you can try.

First you should capture the Solr query, which executed when you hit search.

I use the solr level module to catch the query. Then create your own module with hooks.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement