Jquery – solr with jquery ajax


is it possible to use jquery ajax to send GET variables to Solr and update the content page so the user doesnt have to reload the page?

Best Solution

Your question is a bit strange, as "Yes it most surely is possible" would be the answer.

You don't provide any additional information on what you tried already, why I didn't work out for you and so on. You also didn't provide any info on your "webpage environment" which platform, which languages generate the site, how is the connection so solr made .....

Now aside with all this: Already from the startpage of Apache Solr you can easily conclude that it should be (even easily) possible to use ajax to make the search requests.

What is Solr?


Solr uses the Lucene Java search library at its core for full-text indexing and search, and has REST-like HTTP/XML and JSON APIs that make it easy to use from virtually any programming language.


There is a json api. Sounds perfect for ajax uses.

The Apache Solr wiki even explains how this could work out

Solr: JSON Response Writer you now can easily adapt the javascript code to the jQuery specifics.

Or you use the following jQuery compatible javascript library "for creating user interfaces to Apache Solr".

AJAX Solr (it actually is js-framework agnostic but already comes with a jQuery compatible manager)