Chapter 2. Indexing Your Data

In this chapter, we will cover the following topics:

  • Indexing PDF files
  • Counting the number of fields
  • Using parsing update processors to parse data
  • Using scripting update processors to modify documents
  • Indexing data from a database using Data Import Handler
  • Incremental imports with DIH
  • Transforming data when using DIH
  • Indexing multiple geographical points
  • Updating document fields
  • Detecting the document language during indexation
  • Optimizing the primary key indexation
  • Handling multiple currencies

Introduction

Indexing data is one of the most crucial things in Lucene and Solr deployment. When your data is not indexed properly, your search results will be poor. When the search results are poor, it's almost certain the users will not be satisfied with the application that uses Solr. This is why we need our data to be prepared and indexed as timely and correctly as possible.

On the other hand, preparing data is not an easy task. Nowadays, we have more and more data floating around. We need to index multiple formats of data from multiple sources. Do we need to parse the data manually and prepare the data in XML format? The answer is no; we can let Solr do this for us. This chapter will concentrate on the indexing process and data preparation, starting with how to index data that is a binary PDF file to how to use Data Import Handler to fetch data from database and index it with Apache Solr and describing how we can detect the document language during indexation. We will also learn how to modify the data during indexation so that we don't have to prepare everything upfront.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.119.49