:
: Query.extractTerms throws an exception if called with a non-rewritten
: query. Is it enough to document that (I could do that) or is that
: something that should be fixed (if possible)?

That seems like something that should be a checked Exception (not a
RuntimeException)

Alternately, extractTerms could take in an IndexReader and do it's own
rewriting.  (it's new since 1.4.3 so there's no major harm in changing the
signature.

: BTW, the API is "public void extractTerms(Set)", wouldn't this be more
: natural?: public Set extractTerms()

The advantage of having the Set passed in is that the client can choose
it's own implementation based on it's intended use (ie: if i'm going to
iterate over the results in multiple threads, i may want a
CopyOnWriteArraySet; if i just want fast lookups, i may want a HashSet).
Not to mention the fact that this way, if i want a the set of all terms in
many, many Queries, i can use the method as is to keep adding the terms
into a single set, instead of getting back several and merging them later.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to