lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: How to boost some documents at query-time ?
Date Fri, 21 Aug 2009 02:41:23 GMT

: - The CustomScoreQuery of Lucene :
: http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/search/function/package-summary.html

this is a variation on the FunctionQuery class in Solr, which uses the 
ValueSource API Shalin refered to -- at present the only way to implement 
a ValueSource is either using an index field or an ExternalFile ... but if 
you someone already have the popularity values in memory, you can 
certainly implement your own ValueSource as Shalin suggested...

: > Something like this should be possible by creating your own ValueSource.
: > Look at the ExternalFileField and FileFloatSource in Solr as an example.
: > Instead of loading from a file, you can load it from some other source and
: > refresh it periodically.
: > 
: > You won't be able to sort on it using the sort parameter until [1] is
: > complete. However, you can achieve a similar effect by boosting documents by
: > a function of popularity using function queries in the "q" parameter.
: > 
: > However, if you can re-index your documents periodically, just add the
: > popularity value into the document itself and avoid a complicated system. We
: > do this for a multi-million document index (storing daily popularity as a
: > field). We also have another smaller index which we re-index every 15
: > minutes with the latest popularity values.
: > 
: > [1] - https://issues.apache.org/jira/browse/SOLR-1297
: > 
: >   
: 
: 
: -- 
: Fabrice Estiévenart, Ingénieur R&D, CETIC
: Tél : +32 (0)71/49.07.28
: Web : http://www.cetic.be
: 



-Hoss
Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message