lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Xiao" <>
Subject Sorting VS Scoring
Date Wed, 02 Apr 2008 16:01:49 GMT
I'm trying to figure out what the best practice is in term of using sorting
or customized scoring.

For example, if I have want to index some static pages and rank them by how
many times a page is viewed.  I can get the page view counters and store
them in the index document as a field COUNTER.  I want to be able to sort
query result in the order of most viewed pages.  I see three ways to do it:

1.       Search result sorting, sort);

2.       Use the counter itself as the score

FieldScoreQuery("COUNTER", FieldScoreQuery.Type.INT);

3.       Customize scoring

Set boost on COUNTER field during index time


I haven't got the last one working yet.  Somehow, when I query, boost value
on the COUNTER field is ignored. 


Any inputs?



John X.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message