11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The <strong>Solr</strong> Wiki contains a list of client APIs at http://wiki.apache.org/solr/Integrating<strong>Solr</strong>.<br />

Here is the list of client APIs, current at this writing (November 2011):<br />

Name Environment URL<br />

SolRuby Ruby https://github.com/rsolr/rsolr<br />

Del<strong>Solr</strong> Ruby https://github.com/avvo/delsolr<br />

acts_as_solr Rails http://acts-as-solr.rubyforge.org/, http://rubyforge.org/projects/background-s<br />

olr/<br />

Flare Rails http://wiki.apache.org/solr/Flare<br />

SolPHP PHP http://wiki.apache.org/solr/SolPHP<br />

<strong>Solr</strong>J Java http://wiki.apache.org/solr/SolJava<br />

Python API Python http://wiki.apache.org/solr/SolPython<br />

Py<strong>Solr</strong> Python http://code.google.com/p/pysolr/<br />

SolPerl Perl http://wiki.apache.org/solr/SolPerl<br />

<strong>Solr</strong>.pm Perl http://search.cpan.org/~garafola/<strong>Solr</strong>-0.03/lib/<strong>Solr</strong>.pm<br />

<strong>Solr</strong>Forrest Forrest/Cocoon http://wiki.apache.org/solr/<strong>Solr</strong>Forrest<br />

<strong>Solr</strong>Sharp C# http://www.codeplex.com/solrsharp<br />

SolColdfusion ColdFusion http://solcoldfusion.riaforge.org/<br />

<strong>Solr</strong>Net .NET http://code.google.com/p/solrnet/<br />

AJAX <strong>Solr</strong> AJAX http://github.com/evolvingweb/ajax-solr/wiki<br />

Using JavaScript<br />

Using <strong>Solr</strong> from JavaScript clients is so straightforward that it deserves a special mention. In fact, it is so<br />

straightforward that there is no client API. You don't need to install any packages or configure anything.<br />

HTTP requests can be sent to <strong>Solr</strong> using the standard XMLHttpRequest mechanism.<br />

Out of the box, <strong>Solr</strong> can send JavaScript Object Notation (JSON) responses, which are easily interpreted in<br />

JavaScript. Just add wt=json to the request URL to have responses sent as JSON.<br />

For more information and an excellent example, read the SolJSON page on the <strong>Solr</strong> Wiki:<br />

http://wiki.apache.org/solr/SolJSON<br />

Using Python<br />

<strong>Solr</strong> includes an output format specifically for Python, but JSON output is a little more robust.<br />

Simple Python<br />

Making a query is a simple matter. First, tell Python you will need to make HTTP connections.<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

641

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!