lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@lucene.com
Subject RE: PhrasePrefixQuery.java and MultipleTermPositions.java
Date Wed, 15 May 2002 20:19:41 GMT
> From: Anders Nielsen
> 
> Alternatively to putting all the positions into a SortedSet I 
> could either
> make a TermPositions-wrapper (ala PhrasePosition) that keeps the next
> position as a public variable and make the queue sort on both doc and
> position, or the sorted list of positions could be made with 
> an array of
> ints instead of a SortedSet.
> 
> I think the latter is probably the most efficient, but I 
> can't really tell
> for sure unless I implement both and test. Any suggestions?

To make the latter efficient you would need to be sure to reuse the same
array, so you'd need a TermPositions wrapper anyway, to keep the associated
array.  So I would vote for the former, using a TermPositions wrapper that
holds the current document and position.

Doug

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message