lucene-java-user mailing list archives

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

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
(features_x+feature_y+feature_z).

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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message