views:

96

answers:

1

I have set up Solr and it's working because I can see the search results when I'm typing:

http://localhost:8983/solr/select?q=*:*

in the browser.

However, it doesn't work when I try to contact it through ajax-javascript/jquery.

I've tried with $.get, $.post and with the ajax-solr code:

var Manager;
(function ($) {

  $(function () {
    Manager = new AjaxSolr.Manager({
      solrUrl: 'http://localhost:8983/solr/select'
    });
    Manager.init();
    Manager.store.addByValue('q', '*:*');
    Manager.doRequest();
  });

})(jQuery);

I get no response when I'm checking with firebug.

How comes?

+2  A: 

If you are using the most recent version of ajax-solr, you must remove the trailing "select":

var Manager;
(function ($) {

  $(function () {
    Manager = new AjaxSolr.Manager({
      solrUrl: 'http://localhost:8983/solr/'
    });
    Manager.init();
    Manager.store.addByValue('q', '*:*');
    Manager.doRequest();
  });

})(jQuery);

This change was made as some users needed to be able to contact multiple request handlers.

James McKinney