Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Lucene 4 Cookbook
  • Toc
  • feedback
Lucene 4 Cookbook

Lucene 4 Cookbook

By : Edwood Ng, Vineeth Mohan
3.2 (5)
close
Lucene 4 Cookbook

Lucene 4 Cookbook

3.2 (5)
By: Edwood Ng, Vineeth Mohan

Overview of this book

This book is for software developers who are new to Lucene and who want to explore the more advanced topics to build a search engine. Knowledge of Java is necessary to follow the code samples. You will learn core concepts, best practices, and also advanced features, in order to build an effective search application.
Table of Contents (11 chapters)
close
10
Index

Using PerFieldAnalyzerWrapper

Imagine you are building a search engine for a retailer website where you need to index fields such as product title, description, sku, category, rating, reviews, and so on. Using a general-purpose analyzer for all these fields may not be the best approach. It would work to some degree but you will soon learn that there are cases where a general-purpose analyzer may return undesired results.

For example, say you have a sku "AB-978" and are using StandardAnalyzer for all fields. The analyzer would break up "AB-978" into two, [ab] [978]. This will have an adverse effect in search accuracy because differences in sku between closely related products may vary very little. We may have another product with sku "AB-978-1". In StandardAnalyzer, both strings would produce these two tokens [ab] [978]. When a user searches for the term "AB-978", both products would be treated with equal weight in the search results. So, there is a...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete