Using RealTime Get
Solr also provides us with a way to see documents that are sent to it for indexing but are not indexed or have a commit/soft commit time in the future. This feature also makes Solr behave like a NoSQL data store, wherein we can fetch a document by unique key.
Let's see how we can use this feature in Solr by performing the following steps:
- Let's add the
RealTime Get
(/get
) request handler tosolr-config.xml
, as follows:<requestHandler name="/get" class="solr.RealTimeGetHandler"> <lst name="defaults"> <str name="omitHeader">true</str> <str name="wt">json</str> <str name="indent">true</str> </lst> </requestHandler>
- After adding
requestHandler
, we'll need to changeupdateLog
inupdateHandler
. This is becauseRealTime Get
uses the ...
Get Apache Solr for Indexing Data now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.