On 4/23/2009 2:42 PM, Marcus Herou wrote: > So what you basically are saying is that: > > 1. You have an index which contains data that is more or less static (no > updates) or you have another update interval than the PR interval. > 2. A PR index which is rebuilt (from scratch ?) every X days/weeks/months.
Yep, that's the basic idea. That way, you can rebuild the PageRank index without touching the other index. >> Then when I want to get the value back, I use a FieldScoreQuery, which >> just returns the field value as the document score, like this: >> >> new FieldScoreQuery(PAGE_RANK_FIELD_NAME, FieldScoreQuery.Type.FLOAT); > > Great. Never seen that query type before. Will it use that fields score > solely as the base for rank ? Can it be combinable with other Query types or > am I missing something ? To combine it with other query types, use a CustomScoreQuery, something like: new CustomScoreQuery(otherQuery, pageRankFieldScoreQuery) You may want to subclass CustomScoreQuery and do something more interesting than the default, which is just to multiply the two scores together, I believe. Check the CustomScoreQuery docs for the full details: > What if I instead sorted on that column ? which is most efficient ? > Example: searcher.search(q, null, 100000, new Sort("score", true)); > Then we get to the issue of how to open two indexes and use one > IndexSearcher across them and perhaps a MultiFieldQueryParser to produce the > Query. I've never used a Sort before, so someone else will have to answer this bit. >> If you want to combine the PageRank score with another Query score, then >> you can look at CustomScoreQuery to do so. > > You mean by perhaps combining it with user supplied boost like field:term^4 > ? > Will the score passed in be the score of the FieldScoreQuery if used or the > built in one ? See above. I believe the default CustomScoreQuery behavior is two just multiply the two query scores together, so you'd get something like: otherQueryScore * PageRank for the CustomScoreQuery above. Steve --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org