: > 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.
I think i'm reading he question differently then Grant -- his suggestion applies when you are searching in the description field, and don't want documents with shorter descriptions to score higher when the same terms match the same number of times (the default behavior of lengthNorm) my udnerstanding is that you want documents that don't have a description to score lower then documents that do -- and you might be querying against completely differnet fields (description might not even be indexed) in that case there is no easy way to to achieve this with just the description field ... the easy thing to do is to index a boolean "has_description" field and then incorporate that into your query (or as the input to a function query) -Hoss