O'Reilly logo

Scaling Big Data with Hadoop and Solr by Hrishikesh Karambelkar

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

Index optimization

The indexes used in Apache Solr are inverted indexes. In the case of inverted indexing technique, all your text will be parsed and words will be extracted out of it. These words are then stored as index items, with the location of their appearance. For example, consider the following statements:

  1. Mike enjoys playing on a beach
  2. Playing on ground is a good exercise
  3. Mike loves to exercise daily

The index with location information for all these sentences will look like the following (The numbers in brackets denote (sentence no, word no):

Mike (1,1), (3,1)

enjoys (1,2)

playing (1,3), (2,1)

on (1,4), (2,2)

a (1,5), (2,5)

beach (1,6)

ground (2,3)

is (2,4)

good (2,6)

loves (3,2)

to (3,3)

exercise (2,7), (3,4)

daily (3,5)

When you perform delete on your ...

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