lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: Boost document base on field length
Date Mon, 23 Nov 2009 13:43:03 GMT

On Nov 23, 2009, at 8:01 AM, Tomasz Kępski wrote:

> Hi,
> 
> I would like to boost documents with longer descriptions to move down documents with
0 length description,
> I'm wondering if there is possibility to boost document basing on the field length while
searching or the only way is to store field length as an int in a separate field while indexing?

Override the default Similarity (see the end of the schema.xml file) with your own Similarity
implementation and then in that class override the lengthNorm() method.
Mime
View raw message