lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian R." <egnu...@web.de>
Subject Personalized ranking using pre-computed scores
Date Wed, 22 Aug 2012 15:39:15 GMT
Dear all,

I am currently trying to implement a personalized ranking with Lucene 3.6
for the search in a (non-commercial) social bookmarking system. The ranking
of the search results is supposed to take into account the user who is
logged in and several tags that define the "topic" of the search. The
"parts" of that scoring are precomputed and just "combined" to a new overall
score during search time.

This works already well using a ValueSource that fetches scores from a
database. The downside is that there is a database access for every search
in the system - this can be a bottleneck. To relieve the database it would
be perfect if it would be possible to base the scoring on the Lucene index
only.

Is there a way to store those scoring values within the index and access
them later? For every Document these would be an unsteady number of values
for different users and tags that must be combined later during search time.

I already experimented with that, but fetching Documents during search time
in order to access the fields seems to have an atrocious performance. Like
in a CustomScoreProvider (more or less pseudo code):

@Override
public float customScore(int docId, float subQueryScore, float[]
valSrcScores) {

    Document doc = indexReader.doc(docId);

    float score1 = doc.get("someScoreForAGivenTag");
    float score2 = doc.get("someScoreForAnotherGivenTag");
    float score3 = doc.get("someScoreForTheLoggedInUser");

    return score1 + score2 + score3;
}

Any ideas?

Thanks,
Sebastian



--
View this message in context: http://lucene.472066.n3.nabble.com/Personalized-ranking-using-pre-computed-scores-tp4002683.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
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