11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

http://localhost:8983/solr/techproducts/get?ids=mydoc,IW-02<br />

http://localhost:8983/solr/techproducts/get?id=mydoc&id=IW-02<br />

...<br />

{"response":<br />

{"numFound":2,"start":0,"docs":<br />

[ { "id":"mydoc",<br />

"name":"realtime-get test!",<br />

"_version_":1487137811571146752},<br />

{<br />

"id":"IW-02",<br />

"name":"iPod & iPod Mini USB 2.0 Cable",<br />

...<br />

]<br />

}<br />

}<br />

Real Time Get requests can also be combined with filter queries, specified with an fq parameter, just like search<br />

requests:<br />

http://localhost:8983/solr/techproducts/get?id=mydoc&id=IW-02&fq=name:realtime-get<br />

...<br />

{"response":<br />

{"numFound":1,"start":0,"docs":<br />

[ { "id":"mydoc",<br />

"name":"realtime-get test!",<br />

"_version_":1487137811571146752}<br />

]<br />

}<br />

}<br />

Do NOT disable the realtime get handler at /get if you are using <strong>Solr</strong>Cloud otherwise any leader<br />

election will cause a full sync in ALL replicas for the shard in question. Similarly, a replica recovery will<br />

also always fetch the complete index from the leader because a partial sync will not be possible in the<br />

absence of this handler.<br />

Exporting Result Sets<br />

It's possible to export fully sorted result sets using a special rank query parser and response writer specifically<br />

designed to work together to handle scenarios that involve sorting and exporting millions of records. This uses a<br />

stream sorting technique that begins to send records within milliseconds and continues to stream results until the<br />

entire result set has been sorted and exported.<br />

The cases where this functionality may be useful include: session analysis, distributed merge joins, time series<br />

roll-ups, aggregations on high cardinality fields, fully distributed field collapsing, and sort based stats.<br />

Field Requirements<br />

All the fields being sorted and exported must have docValues set to true. For more information, see the section<br />

on DocValues.<br />

Defining the /export Request Handler<br />

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

404

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

Saved successfully!

Ooh no, something went wrong!