lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: SpanQuery doesn't implement extractTerms
Date Tue, 28 Mar 2006 21:36:24 GMT
markharw00d wrote:
> Is there any particular reason why SpanQuery introduced
>   public Collection getTerms()
> when we have:
>    public void extractTerms(Set terms)
> in Query?

I can think of no compelling reason.

> I am changing the highlighter to make use of extractTerms and can either 
> add this to SpanQuery:
> 
>  public void extractTerms(Set terms) {
>      terms.addAll(getTerms());
>  }
> 
> or (perhaps more riskily) consider removing getTerms() completely from 
> SpanQueries and replace with extractTerms.

I think the latter approach is better.  We'd should deprecate 
getTerms(), in case there is other code that calls it.

Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message