lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto Gimeno <>
Subject Custom scoring algorithm
Date Fri, 13 Nov 2009 14:42:49 GMT

I am developing an application and I would like to add searching
capabilities. I have a database with items. Each item has a number of
"features" with a numeric value. Example: feature_x=100,
feature_y=200. Items can have common or different "features". And they
can have a variable number of "features" as well. In the whole
application can be hundreds of different features. I need users to be
able to make queries by features and I need the results to be sorted
as the sum of those features. For example if a user looks for "x, y,
z", the first result should be the item with the greatest

I think Lucene can be a solution. But I don't need some of its
features such as Analyzers, Filters, Tokenizers... I think I should
implement my own scoring algorithm. How can I do that in the easiest
possible way? I have read something about payloads. Can they be useful
for my needings?

My first attempt was to generate dumb strings containing each feature
name repeated as many times as the feature value. Example: "x, x, x,
x, y, y, z, z". Of course I know this is a very poor solution. And I
also have seen that it doesn't work as I expected because the default
scoring algorithm is much more complex than just counting words.

Thank you very much in advance.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message