lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prasanna R <>
Subject Re: Enhancing Solr relevance functions through predefined constants
Date Tue, 01 Jun 2010 20:06:00 GMT
On Tue, Jun 1, 2010 at 11:57 AM, Chris Hostetter

> :
> : I have a suggestion for improving relevance functions in Solr by way of
> : providing access to a set of pre-defined constants in Solr queries.
> : Specifically, the number of documents indexed, the number of unique terms
> in
> : a field, the total number of terms in a field, etc. are some of the
> : query-time constants that I believe can be made use of in function
> queries
> : as well as boosted queries to aid in the relevance calculations.
> I'm not sure if he was inspired by your email or not, but i did notice
> yonik just opened an issue that sounds very similar to this...
This bug definitely addresses what I had in mind. Glad to see a patch out
for it. I feel this has the potential to become pretty big once we have some
real use cases for it.

> FWIW: number of unique terms in a field is reall, really, expensive to
> compute (although perhaps we could cache it somewhere)

The number of unique terms (and other similar metrics) is pretty much a
query-time constant and we can have it optionally computed and then cached
at the end of every major index build which will make it readily available
for consumption. This will be particularly suited for cases where we have
indexes being built on a node(s) that does not serve traffic and then is
replicated to the servers that handle the traffic.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message