SlideShare a Scribd company logo
Boosting Documents in Solr by Recency, Popularity, and User Preferences Timothy Potter [email_address] , May 25, 2011
What I Will Cover Recency Boost Popularity Boost Filtering based on user preferences
My Background Timothy Potter Large scale distributed systems engineer specializing in Web and enterprise search, machine learning, and big data analytics. 5 years Lucene Search solution for learning management sys 2+ years Solr Mobile app for magazine content Solr + Mahout + Hadoop FAST to Solr Migration for a Real Estate Portal VinWiki: Wine search and recommendation engine
Boost documents by age Just do a descending sort by age = done? Boost more recent documents and penalize older documents just for being old Useful for news, business docs, and local search
Solr: Indexing In schema.xml: <fieldType name=&quot;tdate&quot;  class=&quot;solr.TrieDateField&quot;  omitNorms=&quot;true&quot;  precisionStep=&quot;6&quot;  positionIncrementGap=&quot;0&quot;/> <field name=&quot;pubdate&quot;  type=&quot;tdate&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot;  required=&quot;true&quot; /> Date published = DateUtils.round(item.getPublishedOnDate(),Calendar.HOUR);
FunctionQuery Basics FunctionQuery: Computes a value for each document Ranking Sorting constant literal fieldvalue ord rord sum sub product pow abs log sqrt map scale query linear recip max min ms sqedist - Squared Euclidean Dist hsin, ghhsin - Haversine Formula geohash - Convert to geohash strdist
Solr: Query Time Boost Use the recip function with the ms function: q={!boost b=$recency v=$qq}& recency=recip(ms(NOW/HOUR,pubdate),3.16e-11,0.08,0.05)& qq=wine Use edismax vs. dismax if possible : q=wine& boost=recip(ms(NOW/HOUR,pubdate),3.16e-11,0.08,0.05) Recip is a highly tunable function recip(x,m,a,b) implementing a / (m*x + b) m = 3.16E-11 a= 0.08 b=0.05 x = Document Age
Tune Solr recip function
Tips and Tricks Boost should be a multiplier on the relevancy score  {!boost b=} syntax confuses the spell checker so you need to use  spellcheck.q  to be explicit q={!boost b=$recency v=$qq}&spellcheck.q=wine  Bottom out the old age penalty using min: min(recip(…), 0.20) Not a one-size fits all solution – academic research focused on when to apply it
Score based on number of unique views Not known at indexing time View count should be broken into time slots Boost by Popularity
Popularity Illustrated
Solr: ExternalFileField In schema.xml: <fieldType name=&quot;externalPopularityScore&quot;  keyField=&quot;id&quot;  defVal=&quot;1&quot;  stored=&quot;false&quot; indexed=&quot;false&quot;  class=” solr.ExternalFileField &quot;  valType=&quot;pfloat&quot;/> <field name=&quot;popularity&quot;  type=&quot;externalPopularityScore&quot; />
Popularity Boost: Nuts & Bolts Logs Solr Server User activity logged View Counting Job solr-home/data/ external_popularity a=1.114 b=1.05 c=1.111 … commit
Popularity Tips & Tricks For big, high traffic sites, use log analysis Perfect problem for MapReduce Take a look at Hive for analyzing large volumes of log data Minimum popularity score is 1 (not zero) … up to 2 or more 1 + (0.4*recent + 0.3*lastWeek + 0.2*lastMonth …) Watch out for spell checker “buildOnCommit”
Filtering By User Preferences Easy approach is to build basic preference fields in to the index: Content types of interest – content_type High-level categories of interest - category Source of interest – source We had too many categories and sources that a user could enable / disable to use basic filtering Custom SearchComponent with a connection to a JDBC DataSource
Preferences Component Connects to a database Caches DocIdSet in a Solr FastLRUCache Cached values marked as dirty using a simple timestamp passed in the request Declared in solrconfig.xml: <searchComponent  class=“demo.solr.PreferencesComponent&quot;  name=”pref&quot;> <str name=&quot;jdbcJndi&quot;>jdbc/solr</str>  </searchComponent>
Preferences Filter Parameters passed in the query string: pref.id = primary key in db pref.mod = preferences modified on timestamp So the Solr side knows the database has been updated Use simple SQL queries to compute a list of disabled categories, feeds, and types Lucene FieldCaches for category, source, type Custom SearchComponent included in the list of components for edismax search handler <arr name=&quot;last-components&quot;> <str>pref</str>  </arr>
Preferences Filter in Action User Preferences Db Solr Server LRU Cache Preferences Component Update Preferences Query with pref.id=123 and pref.mod = TS pref.id & pref.mod If cached mod == pref.mod read from cache SQL to compute excluded categories sources and types
Wrap Up Use recip & ms functions to boost recent documents Use ExternalFileField to load popularity scores calculated outside the index Use a custom SearchComponent with a Solr FastLRUCache to filter documents using complex user preferences
Contact Timothy Potter [email_address] http://thelabdude.blogspot.com http://www.linkedin.com/in/thelabdude

More Related Content

PPT
Boosting Documents in Solr by Recency, Popularity and Personal Preferences - ...
PPTX
Haystack 2019 - Custom Solr Query Parser Design Option, and Pros & Cons - Ber...
KEY
JSON-LD: JSON for Linked Data
PDF
Using MongoDB as a high performance graph database
PPTX
자바 성능 강의
PDF
오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인
PPTX
Building a real time, solr-powered recommendation engine
PPTX
RDF Data Model
Boosting Documents in Solr by Recency, Popularity and Personal Preferences - ...
Haystack 2019 - Custom Solr Query Parser Design Option, and Pros & Cons - Ber...
JSON-LD: JSON for Linked Data
Using MongoDB as a high performance graph database
자바 성능 강의
오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인
Building a real time, solr-powered recommendation engine
RDF Data Model

What's hot (20)

PDF
AWS 마켓플레이스 성공 런칭을 위한 핵심 기술 (이경수, AWS 솔루션즈아키텍트) :: AWS TechShift 2018
PPTX
Self-learned Relevancy with Apache Solr
PPTX
SPARQL introduction and training (130+ slides with exercices)
PPTX
Graph and RDF databases
PDF
Solr Query Parsing
PPTX
온톨로지 개념 및 표현언어
PDF
Spark SQL Tutorial | Spark Tutorial for Beginners | Apache Spark Training | E...
PDF
Improving Python and Spark (PySpark) Performance and Interoperability
PPT
Web semantica
PPTX
Introduction to SPARQL
PPTX
Data model in salesforce
PDF
Introduction to RDF & SPARQL
PDF
JSON-LD: JSON for the Social Web
PPTX
Salesforce App ideas
PDF
Amazon Rekognition을 통한 이미지 인식 서비스 구축하기
PDF
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
PPTX
Apache Solr
PDF
Apache Spark vs Apache Spark: An On-Prem Comparison of Databricks and Open-So...
PDF
Graph based data models
PDF
Filtering, Searching, and Sorting ActiveRecord Lists Using Filterrific
AWS 마켓플레이스 성공 런칭을 위한 핵심 기술 (이경수, AWS 솔루션즈아키텍트) :: AWS TechShift 2018
Self-learned Relevancy with Apache Solr
SPARQL introduction and training (130+ slides with exercices)
Graph and RDF databases
Solr Query Parsing
온톨로지 개념 및 표현언어
Spark SQL Tutorial | Spark Tutorial for Beginners | Apache Spark Training | E...
Improving Python and Spark (PySpark) Performance and Interoperability
Web semantica
Introduction to SPARQL
Data model in salesforce
Introduction to RDF & SPARQL
JSON-LD: JSON for the Social Web
Salesforce App ideas
Amazon Rekognition을 통한 이미지 인식 서비스 구축하기
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
Apache Solr
Apache Spark vs Apache Spark: An On-Prem Comparison of Databricks and Open-So...
Graph based data models
Filtering, Searching, and Sorting ActiveRecord Lists Using Filterrific
Ad

Viewers also liked (20)

PDF
Implementing Click-through Relevance Ranking in Solr and LucidWorks Enterprise
PDF
Learning to Rank in Solr: Presented by Michael Nilsson & Diego Ceccarelli, Bl...
PDF
Semantic & Multilingual Strategies in Lucene/Solr
PDF
Click-through relevance ranking in solr &  lucid works enterprise - By Andrz...
PPTX
Practical Machine Learning for Smarter Search with Solr and Spark
PDF
네이버 지식쇼핑과 아마존의 검색결과 페이지네비게이션 유형분석
PPTX
Getting started with Elasticsearch and .NET
PDF
Query Parsing - Tips and Tricks
PDF
Twitter Search Architecture
PDF
第16回Lucene/Solr勉強会 – ランキングチューニングと定量評価 #SolrJP
PDF
Building a Real-time Solr-powered Recommendation Engine
DOC
Black+listed+companies+list+in+hyd
PDF
Language support and linguistics in lucene solr & its eco system
PDF
Learn How to Master Solr1 4
PPT
Lady gaga
PDF
Building a Lightweight Discovery Interface for Chinese Patents, Presented by ...
PDF
Overview of Searching in Solr 1.4
PDF
What’s new in apache lucene 3.0
PPTX
PPT
Portades
Implementing Click-through Relevance Ranking in Solr and LucidWorks Enterprise
Learning to Rank in Solr: Presented by Michael Nilsson & Diego Ceccarelli, Bl...
Semantic & Multilingual Strategies in Lucene/Solr
Click-through relevance ranking in solr &  lucid works enterprise - By Andrz...
Practical Machine Learning for Smarter Search with Solr and Spark
네이버 지식쇼핑과 아마존의 검색결과 페이지네비게이션 유형분석
Getting started with Elasticsearch and .NET
Query Parsing - Tips and Tricks
Twitter Search Architecture
第16回Lucene/Solr勉強会 – ランキングチューニングと定量評価 #SolrJP
Building a Real-time Solr-powered Recommendation Engine
Black+listed+companies+list+in+hyd
Language support and linguistics in lucene solr & its eco system
Learn How to Master Solr1 4
Lady gaga
Building a Lightweight Discovery Interface for Chinese Patents, Presented by ...
Overview of Searching in Solr 1.4
What’s new in apache lucene 3.0
Portades
Ad

Similar to Boosting Documents in Solr by Recency, Popularity, and User Preferences (20)

PPT
Boosting Documents in Solr (Lucene Revolution 2011)
PDF
Reflected intelligence evolving self-learning data systems
ODP
Dev8d Apache Solr Tutorial
ODP
Letting In the Light: Using Solr as an External Search Component
PDF
Performance Tuning for Visualforce and Apex
PPTX
Sumo Logic Cert Jam - Fundamentals
PDF
Cloudera Movies Data Science Project On Big Data
PDF
Solr JDBC: Presented by Kevin Risden, Avalon Consulting
PPT
Presentation Moss 2007 Usman
PPTX
Implementing full text search with Apache Solr
PPT
Solr Presentation
PPTX
Solr JDBC - Lucene/Solr Revolution 2016
PDF
Level 2 Certification: Using Sumo Logic - Oct 2018
PPTX
Portfolio Oversight With eazyBI
PPT
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
PDF
Nose Dive into Apache Spark ML
PPTX
2018 data warehouse features in spark
PPTX
Welcome Webinar Slides
PPT
ImageSemantics : User-Generated Metadata, Content-Based Retrieval & Beyond
PDF
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
Boosting Documents in Solr (Lucene Revolution 2011)
Reflected intelligence evolving self-learning data systems
Dev8d Apache Solr Tutorial
Letting In the Light: Using Solr as an External Search Component
Performance Tuning for Visualforce and Apex
Sumo Logic Cert Jam - Fundamentals
Cloudera Movies Data Science Project On Big Data
Solr JDBC: Presented by Kevin Risden, Avalon Consulting
Presentation Moss 2007 Usman
Implementing full text search with Apache Solr
Solr Presentation
Solr JDBC - Lucene/Solr Revolution 2016
Level 2 Certification: Using Sumo Logic - Oct 2018
Portfolio Oversight With eazyBI
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
Nose Dive into Apache Spark ML
2018 data warehouse features in spark
Welcome Webinar Slides
ImageSemantics : User-Generated Metadata, Content-Based Retrieval & Beyond
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster

More from Lucidworks (Archived) (20)

PDF
Integrating Hadoop & Solr
PDF
The Data-Driven Paradigm
PDF
Downtown SF Lucene/Solr Meetup - September 17: Thoth: Real-time Solr Monitori...
PDF
SFBay Area Solr Meetup - July 15th: Integrating Hadoop and Solr
PPTX
SFBay Area Solr Meetup - June 18th: Box + Solr = Content Search for Business
PPTX
SFBay Area Solr Meetup - June 18th: Benchmarking Solr Performance
PPTX
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
PPTX
Chicago Solr Meetup - June 10th: Exploring Hadoop with Search
PPTX
What's new in solr june 2014
PPTX
Minneapolis Solr Meetup - May 28, 2014: eCommerce Search with Apache Solr
PPTX
Minneapolis Solr Meetup - May 28, 2014: Target.com Search
PPTX
Exploration of multidimensional biomedical data in pub chem, Presented by Lia...
PDF
Unstructured Or: How I Learned to Stop Worrying and Love the xml, Presented...
PDF
Big Data Challenges, Presented by Wes Caldwell at SolrExchage DC
PPTX
What's New in Lucene/Solr Presented by Grant Ingersoll at SolrExchage DC
PPTX
Solr At AOL, Presented by Sean Timm at SolrExchage DC
PPTX
Intro to Solr Cloud, Presented by Tim Potter at SolrExchage DC
PPTX
Test Driven Relevancy, Presented by Doug Turnbull at SolrExchage DC
PPTX
Building a data driven search application with LucidWorks SiLK
PPTX
Introducing LucidWorks App for Splunk Enterprise webinar
Integrating Hadoop & Solr
The Data-Driven Paradigm
Downtown SF Lucene/Solr Meetup - September 17: Thoth: Real-time Solr Monitori...
SFBay Area Solr Meetup - July 15th: Integrating Hadoop and Solr
SFBay Area Solr Meetup - June 18th: Box + Solr = Content Search for Business
SFBay Area Solr Meetup - June 18th: Benchmarking Solr Performance
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
Chicago Solr Meetup - June 10th: Exploring Hadoop with Search
What's new in solr june 2014
Minneapolis Solr Meetup - May 28, 2014: eCommerce Search with Apache Solr
Minneapolis Solr Meetup - May 28, 2014: Target.com Search
Exploration of multidimensional biomedical data in pub chem, Presented by Lia...
Unstructured Or: How I Learned to Stop Worrying and Love the xml, Presented...
Big Data Challenges, Presented by Wes Caldwell at SolrExchage DC
What's New in Lucene/Solr Presented by Grant Ingersoll at SolrExchage DC
Solr At AOL, Presented by Sean Timm at SolrExchage DC
Intro to Solr Cloud, Presented by Tim Potter at SolrExchage DC
Test Driven Relevancy, Presented by Doug Turnbull at SolrExchage DC
Building a data driven search application with LucidWorks SiLK
Introducing LucidWorks App for Splunk Enterprise webinar

Recently uploaded (20)

PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
August Patch Tuesday
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Getting Started with Data Integration: FME Form 101
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Machine learning based COVID-19 study performance prediction
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MIND Revenue Release Quarter 2 2025 Press Release
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Spectral efficient network and resource selection model in 5G networks
Advanced methodologies resolving dimensionality complications for autism neur...
August Patch Tuesday
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Getting Started with Data Integration: FME Form 101
cloud_computing_Infrastucture_as_cloud_p
Machine learning based COVID-19 study performance prediction
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Unlocking AI with Model Context Protocol (MCP)
Encapsulation_ Review paper, used for researhc scholars
Network Security Unit 5.pdf for BCA BBA.
Group 1 Presentation -Planning and Decision Making .pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Boosting Documents in Solr by Recency, Popularity, and User Preferences

  • 1. Boosting Documents in Solr by Recency, Popularity, and User Preferences Timothy Potter [email_address] , May 25, 2011
  • 2. What I Will Cover Recency Boost Popularity Boost Filtering based on user preferences
  • 3. My Background Timothy Potter Large scale distributed systems engineer specializing in Web and enterprise search, machine learning, and big data analytics. 5 years Lucene Search solution for learning management sys 2+ years Solr Mobile app for magazine content Solr + Mahout + Hadoop FAST to Solr Migration for a Real Estate Portal VinWiki: Wine search and recommendation engine
  • 4. Boost documents by age Just do a descending sort by age = done? Boost more recent documents and penalize older documents just for being old Useful for news, business docs, and local search
  • 5. Solr: Indexing In schema.xml: <fieldType name=&quot;tdate&quot; class=&quot;solr.TrieDateField&quot; omitNorms=&quot;true&quot; precisionStep=&quot;6&quot; positionIncrementGap=&quot;0&quot;/> <field name=&quot;pubdate&quot; type=&quot;tdate&quot; indexed=&quot;true&quot; stored=&quot;true&quot; required=&quot;true&quot; /> Date published = DateUtils.round(item.getPublishedOnDate(),Calendar.HOUR);
  • 6. FunctionQuery Basics FunctionQuery: Computes a value for each document Ranking Sorting constant literal fieldvalue ord rord sum sub product pow abs log sqrt map scale query linear recip max min ms sqedist - Squared Euclidean Dist hsin, ghhsin - Haversine Formula geohash - Convert to geohash strdist
  • 7. Solr: Query Time Boost Use the recip function with the ms function: q={!boost b=$recency v=$qq}& recency=recip(ms(NOW/HOUR,pubdate),3.16e-11,0.08,0.05)& qq=wine Use edismax vs. dismax if possible : q=wine& boost=recip(ms(NOW/HOUR,pubdate),3.16e-11,0.08,0.05) Recip is a highly tunable function recip(x,m,a,b) implementing a / (m*x + b) m = 3.16E-11 a= 0.08 b=0.05 x = Document Age
  • 8. Tune Solr recip function
  • 9. Tips and Tricks Boost should be a multiplier on the relevancy score {!boost b=} syntax confuses the spell checker so you need to use spellcheck.q to be explicit q={!boost b=$recency v=$qq}&spellcheck.q=wine Bottom out the old age penalty using min: min(recip(…), 0.20) Not a one-size fits all solution – academic research focused on when to apply it
  • 10. Score based on number of unique views Not known at indexing time View count should be broken into time slots Boost by Popularity
  • 12. Solr: ExternalFileField In schema.xml: <fieldType name=&quot;externalPopularityScore&quot; keyField=&quot;id&quot; defVal=&quot;1&quot; stored=&quot;false&quot; indexed=&quot;false&quot; class=” solr.ExternalFileField &quot; valType=&quot;pfloat&quot;/> <field name=&quot;popularity&quot; type=&quot;externalPopularityScore&quot; />
  • 13. Popularity Boost: Nuts & Bolts Logs Solr Server User activity logged View Counting Job solr-home/data/ external_popularity a=1.114 b=1.05 c=1.111 … commit
  • 14. Popularity Tips & Tricks For big, high traffic sites, use log analysis Perfect problem for MapReduce Take a look at Hive for analyzing large volumes of log data Minimum popularity score is 1 (not zero) … up to 2 or more 1 + (0.4*recent + 0.3*lastWeek + 0.2*lastMonth …) Watch out for spell checker “buildOnCommit”
  • 15. Filtering By User Preferences Easy approach is to build basic preference fields in to the index: Content types of interest – content_type High-level categories of interest - category Source of interest – source We had too many categories and sources that a user could enable / disable to use basic filtering Custom SearchComponent with a connection to a JDBC DataSource
  • 16. Preferences Component Connects to a database Caches DocIdSet in a Solr FastLRUCache Cached values marked as dirty using a simple timestamp passed in the request Declared in solrconfig.xml: <searchComponent class=“demo.solr.PreferencesComponent&quot; name=”pref&quot;> <str name=&quot;jdbcJndi&quot;>jdbc/solr</str> </searchComponent>
  • 17. Preferences Filter Parameters passed in the query string: pref.id = primary key in db pref.mod = preferences modified on timestamp So the Solr side knows the database has been updated Use simple SQL queries to compute a list of disabled categories, feeds, and types Lucene FieldCaches for category, source, type Custom SearchComponent included in the list of components for edismax search handler <arr name=&quot;last-components&quot;> <str>pref</str> </arr>
  • 18. Preferences Filter in Action User Preferences Db Solr Server LRU Cache Preferences Component Update Preferences Query with pref.id=123 and pref.mod = TS pref.id & pref.mod If cached mod == pref.mod read from cache SQL to compute excluded categories sources and types
  • 19. Wrap Up Use recip & ms functions to boost recent documents Use ExternalFileField to load popularity scores calculated outside the index Use a custom SearchComponent with a Solr FastLRUCache to filter documents using complex user preferences
  • 20. Contact Timothy Potter [email_address] http://thelabdude.blogspot.com http://www.linkedin.com/in/thelabdude

Editor's Notes

  • #2: Attendees with come away from this presentation with a good understanding and access to source code for boosting and/or filtering documents by recency, popularity, and personal preferences. My solution improves upon the common &amp;quot;recip&amp;quot; based solution for boosting by document age. The framework also supports boosting documents by a popularity score, which is calculated and managed outside the index. I will present a few different ways to calculate popularity in a scalable manner. Lastly, my solution supports the concept of a personal document collection, where each user is only interested in a subset of the total number of documents in the index. My presentation will provide a good example of how to filter and/or boost results based on user preferences, which is a very common requirement of many Web applications.
  • #3: The one thing I’d like you to come away with today is confidence that Solr has powerful boosting capabilities built-in, but they require some fine-tuning and experimentation. Some simple recipes for complementing core Solr functionality to do: I. Boost documents by age (recency / freshness boost) II. Boost documents by popularity III. Filter results based on User Preferences (Personalized collection)
  • #4: Currently working at the National Renewable Energy Laboratory on building an infrastructure for storing and analyzing large volumes of smart grid related energy data using Hadoop technologies. Been doing search work for the past 5 years including a Lucene based search solution of eLearning content, Solr based solution for online magazine content and a FAST to Solr migration for a real estate portal. My other area of interest is in Mahout; I&apos;ve contributed a few bug fixes and several pages on the wiki including working with Grant Ingersoll on benchmarking Mahout&apos;s distributed clustering algorithms in the Amazon cloud. Technical Blog: http://thelabdude.blogspot.com/ Currently working on JSF2 components for Solr.
  • #5: All other things being equal, more recent documents are better What’s not covered is how to determine if you should apply the boost. That’s a more in-depth topic that is the focus of academic research, especially in relation to Web search. News and most magazine articles Business documents – perhaps a less aggressive boost function identification of recency sensitive queries before ranking. see: http://technicallypossible.wordpress.com/2011/03/13/identifying-queries-which-demand-recency-sensitive-results-in-web-search/
  • #6: Careful! TrieFields make it more efficient to do range searches on numeric fields indexed at full precision, but it doesn&apos;t actually do anything to round the fields for people who genuinely want their stored and index values to only have second/minute/hour/day precision regardless of what the initial raw data looks like. Currently, Solr doesn&apos;t have anything built-in to round a date down to a different precision, such as minute / hour. Thus, you may need to do this yourself prior to indexing a document. see SOLR-741 // from commons DateUtils Date published = DateUtils.round(item.getPublishedOnDate(), Calendar.HOUR);
  • #8: Solr 1.4+ the recommended approach is to use the recip function with the ms function: There are approximately 3.16e10 milliseconds in a year, so one can scale dates to fractions of a year with the inverse, or 3.16e-11 recip(ms(NOW/HOUR,pubdate),3.16e-11,1,1) For standard query parser, you could do: q={!boost b=recip(ms(NOW/HOUR,pubdate),3.16e-11,1,1)}wine This uses the built-in boost function query. This uses a Lucene FieldCache under the covers on the pubdate field (stored in the index as long). The ms(NOW/HOUR) uses less precise measure of document age (rounding clause), which helps reduce memory consumption. Lessons: 1 - {!boost b=} syntax breaks spell-checking so you need to use spellcheck.q to be explicit 2 - Use edismax because it multiplies the boost whereas dismax adds &amp;quot;bf&amp;quot; 3 - Use a tdate field when indexing 4 - Use ms(NOW/HOUR) and less precision when indexing 5 - Use max(boost,0.20) - to bottom out the age penalty
  • #9: A reciprocal function with recip(x,m,a,b) implementing a/(m*x+b). m,a,b are constants, x is any numeric field or arbitrarily complex function. When a and b are equal, and x&gt;=0, this function has a maximum value of 1 that drops as x increases. Increasing the value of a and b together results in a movement of the entire function to a flatter part of the curve. These properties can make this an ideal function for boosting more recent documents – see http://wiki.apache.org/solr/FunctionQuery
  • #10: identification of recency sensitive queries before ranking. see: http://technicallypossible.wordpress.com/2011/03/13/identifying-queries-which-demand-recency-sensitive-results-in-web-search/
  • #11: Score made of number of unique views in a time slot + avg rating / # of comments, etc. Must be computed outside of the index; refreshed periodically Probably don’t want to mix this with age boost as an older document might be really popular for some weird reason; think of old videos that become popular on YouTube Age – probably not as an old doc might get popular identification of recency sensitive queries before ranking. see: http://technicallypossible.wordpress.com/2011/03/13/identifying-queries-which-demand-recency-sensitive-results-in-web-search/
  • #12: Bar chart illustrates time slots Popularity score favors more recent content Document A is most popular; B was popular but is now on the decline and C has enjoyed consistent interest for a longer period but scores a little lower than A because of the recent interest in A
  • #15: Most likely use case would be to use log-file analysis &gt; Ideal problem for MapReduce Question the audience – who has heard of MapReduce?