Book Image

Apache Solr Essentials

By : Andrea Gazzarini
Book Image

Apache Solr Essentials

By: Andrea Gazzarini

Overview of this book

<p>Search is everywhere. Users always expect a search facility in mobile or web applications that allows them to find things in a fast and friendly manner.</p> <p>Apache Solr Essentials is a fast-paced guide to help you quickly learn the process of creating a scalable, efficient, and powerful search application. The book starts off by explaining the fundamentals of Solr and then goes on to cover various topics such as data indexing, ways of extending Solr, client APIs and their indexing and data searching capabilities, an introduction to the administration, monitoring, and tuning of a Solr instance, as well as the concepts of sharding and replication. Next, you'll learn about various Solr extensions and how to contribute to the Solr community. By the end of this book, you will be able to create excellent search applications with the help of Solr.</p>
Table of Contents (16 chapters)
Apache Solr Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

DataImportHandler


The DataImportHandler is a module that enables Solr to load data from several types of data sources. The most frequent type of storage where applications put their data is undoubtedly a relational database, but in general, we could have a lot of scenarios here: filesystems, websites, emails, FTP servers, LDAP, NoSQL databases, and so on.

The DataImportHandler module, other than providing a lot of ready-to-use connectors, is an extensible framework where developers are free to inject their storage-specific connector logic. The configuration happens in two different places: the first is the solrconfig.xml file (as usual), where the handler is declared as follows:

<requestHandler name="/import" class="org.apache.solr.handler.dataimport.DataImportHandler">
  <lst name="defaults">
    <str name="config">dih-config.xml</str>
  </lst>
</requestHandler>

The second is the handler configuration file (in the preceding example, we called it dih-config...