Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Apache Solr Search Patterns

You're reading from   Apache Solr Search Patterns Leverage the power of Apache Solr to power up your business by navigating your users to their data quickly and efficiently

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781783981847
Length 316 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Jayant Kumar Jayant Kumar
Author Profile Icon Jayant Kumar
Jayant Kumar
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Solr Indexing Internals 2. Customizing the Solr Scoring Algorithm FREE CHAPTER 3. Solr Internals and Custom Queries 4. Solr for Big Data 5. Solr in E-commerce 6. Solr for Spatial Search 7. Using Solr in an Advertising System 8. AJAX Solr 9. SolrCloud 10. Text Tagging with Lucene FST Index

Implementing the information gain model

The problem with the information gain model is that, for each term in the index, we will have to evaluate the occurrence of every other term. The complexity of the algorithm will be of the order of square of the two terms, square(xy). It is not possible to compute this using a simple machine. What is recommended is that we create a map-reduce job and use a distributed Hadoop cluster to compute the information gain for each term in the index.

Our distributed Hadoop cluster would do the following:

  • Count all occurrences of each term in the index
  • Count all occurrences of each co-occurring term in the index
  • Construct a hash table or a map of co-occurring terms
  • Calculate the information gain for each term and store it in a file in the Hadoop cluster

In order to implement this in our scoring algorithm, we will need to build a custom scorer where the IDF calculation is overwritten by the algorithm for deriving the information gain for the term from the Hadoop cluster...

You have been reading a chapter from
Apache Solr Search Patterns
Published in: Apr 2015
Publisher:
ISBN-13: 9781783981847
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 $19.99/month. Cancel anytime
Banner background image