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.

[<br />

{<br />

"id": "1",<br />

"title": "<strong>Solr</strong> adds block join support",<br />

"content_type": "parentDocument",<br />

"_childDocuments_": [<br />

{<br />

"id": "2",<br />

"comments": "<strong>Solr</strong>Cloud supports it too!"<br />

}<br />

]<br />

},<br />

{<br />

"id": "3",<br />

"title": "New Lucene and <strong>Solr</strong> release is out",<br />

"content_type": "parentDocument",<br />

"_childDocuments_": [<br />

{<br />

"id": "4",<br />

"comments": "Lots of new features"<br />

}<br />

]<br />

}<br />

]<br />

Note<br />

One limitation of indexing nested documents is that the whole block of parent-children documents must<br />

be updated together whenever any changes are required. In other words, even if a single child document<br />

or the parent document is changed, the whole block of parent-child documents must be indexed<br />

together.<br />

Uploading Data with <strong>Solr</strong> Cell using <strong>Apache</strong> Tika<br />

<strong>Solr</strong> uses code from the <strong>Apache</strong> Tika project to provide a framework for incorporating many different file-format<br />

parsers such as <strong>Apache</strong> PDFBox and <strong>Apache</strong> POI into <strong>Solr</strong> itself. Working with this framework, <strong>Solr</strong>'s Extracti<br />

ngRequestHandler can use Tika to support uploading binary files, including files in popular formats such as<br />

Word and PDF, for data extraction and indexing.<br />

When this framework was under development, it was called the <strong>Solr</strong> Content Extraction Library or CEL; from that<br />

abbreviation came this framework's name: <strong>Solr</strong> Cell.<br />

If you want to supply your own ContentHandler for <strong>Solr</strong> to use, you can extend the ExtractingRequestHan<br />

dler and override the createFactory() method. This factory is responsible for constructing the <strong>Solr</strong>Conten<br />

tHandler that interacts with Tika, and allows literals to override Tika-parsed values. Set the parameter litera<br />

lsOverride, which normally defaults to *true, to *false" to append Tika-parsed values to literal values.<br />

For more information on <strong>Solr</strong>'s Extracting Request Handler, see https://wiki.apache.org/solr/ExtractingRequestH<br />

andler.<br />

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

198

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

Saved successfully!

Ooh no, something went wrong!