lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan McKinley <ryan...@gmail.com>
Subject Re: MoreLikeThis API changes?
Date Wed, 30 May 2007 16:16:16 GMT
> 
>> 2. Do retrieveTerms(int docNum) and createQuery(PriorityQueue q) need 
>> to be private?  Can they be public?  If not public, could they at 
>> least be protected?
>>
> 
> I would think protected would be fine, what is your case for it being 
> public?
> 

 From the solr RequestHandler, I want to return the "interesting" terms 
used for MLT.  If retrieveTerms() is public, the handler could do this 
for any MLT implementation.  If protected, it would be locked to its own 
subclass of MLT (ok, but not ideal).

Since retrieveInterestingTerms(Reader) is public, it seems reasonable.

- - - -

In implementing the handler, i ran into another related problem...

Is there any way to walk through a PriorityQueue without destroying it? 
  Everything I see calls pq.pop() in a loop.  I would like to be able to 
use the queue to construct the MLT query and for display.  For large 
documents, constructing the "interesting" terms can be very slow, so 
doing it twice isn't a good idea.


thanks
ryan

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