Book Image

Apache Solr Enterprise Search Server - Third Edition

By : David Smiley, Eric Pugh, Kranti Parisa, Matt Mitchell
Book Image

Apache Solr Enterprise Search Server - Third Edition

By: David Smiley, Eric Pugh, Kranti Parisa, Matt Mitchell

Overview of this book

<p>Solr Apache is a widely popular open source enterprise search server that delivers powerful search and faceted navigation features—features that are elusive with databases. Solr supports complex search criteria, faceting, result highlighting, query-completion, query spell-checking, relevancy tuning, geospatial searches, and much more.</p> <p>This book is a comprehensive resource for just about everything Solr has to offer, and it will take you from first exposure to development and deployment in no time. Even if you wish to use Solr 5, you should find the information to be just as applicable due to Solr's high regard for backward compatibility. The book includes some useful information specific to Solr 5.</p>
Table of Contents (19 chapters)
Apache Solr Enterprise Search Server Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Solr's Update-XML format


Using XML, you can send add, commit, optimize, and delete commands to Solr. Here is an XML sample for sending HTTP POST to Solr; this will add (or replace) documents:

<add overwrite="true">
  <doc boost="2.0">
    <field name="id">Artist:11650</field>
    <field name="type">Artist</field>
    <field name="a_name" boost="0.5">The Smashing Pumpkins</field>
    <!-- the date/time syntax MUST look just like this -->
    <field name="a_begin_date">2007-12-31T09:40:00Z</field>
  </doc>
  <doc>
    <field name="id">Artist:11651</field>
    <field name="type">Artist</field>
    <field name="a_begin_date">2007-12-31T09:40:00Z</field>
  </doc>
  <!-- more doc elements here as needed -->
</add>

Tip

A valid XML document has one root element. If you want to send multiple XML-based commands to Solr in the same message/file, you can wrap the commands...