Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Apache Solr 7.x

You're reading from  Mastering Apache Solr 7.x

Product type Book
Published in Feb 2018
Publisher Packt
ISBN-13 9781788837385
Pages 308 pages
Edition 1st Edition
Languages
Authors (3):
Sandeep Nair Sandeep Nair
Profile icon Sandeep Nair
Chintan Mehta Chintan Mehta
Profile icon Chintan Mehta
Dharmesh Vasoya Dharmesh Vasoya
Profile icon Dharmesh Vasoya
View More author details

Understanding filters


We have seen that the analyzer uses a series of tokenizer and filter classes together to transform the input string into a token string, which will be used by Solr in indexing. The job of the filter is different from the tokenizer. The tokenizer mostly splits the input string at some delimiters and generates a token stream. The filter transforms this stream into some other form and generates a new token stream. The input for a filter will be a token stream, not an input string, unlike what we were passing at the time of tokenization. The entire token stream generated through tokenization will be passed to the first filter class in the list. Let's cover filters in detail.

What is a filter?

A filter is a tool provided by Solr that runs a filtering process as follows:

  • Adding: Adds a new token to the stream, such as adding synonyms
  • Removing: Removes a token from the stream, such as stop words
  • Conversation: Converts a token from one form to another form, say uppercase to lower...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}