O'Reilly logo

Apache Solr for Indexing Data by Anshul Johri, Sachin Handiekar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Indexing Data

In the previous chapter, we saw the various analyzers, tokenizers, and filters provided by Solr that help us select the most important data from a given document. In this chapter, we'll see how Solr provides us a way to index this data so that we can run queries on top of it. We'll cover the following topics in this chapter:

  • Defining field types in Solr
  • Creating a custom musicCatalogue example
  • Facet searching

The Solr indexing process can mainly be broken down into two major parts:

  • Converting the document from its native format to XML or JSON, both of which are supported by Solr
  • Adding documents into Solr datastore using API or HTTP POST

To better understand the preceding two parts, we'll create an example of a music catalogue ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required