lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject Re: Query.extractTerms - a poor introspection API?
Date Thu, 06 Apr 2006 14:04:50 GMT

On Apr 6, 2006, at 2:52 AM, mark harwood wrote:
> Maybe we should have as a standard part of Query:
>
>   //immediate child queries only
>   Query [] getNestedQueries();
>
> and...
>   //immediate terms only
>   Term [] getTerms();

FWIW:   In KinoSearch, I have extract_terms set up to return either a  
Term, or in the case of PhraseQuery, a reference to an array of  
Terms.  When the Highlighter sees the arrayref, it knows to winnow  
down the positions that the term appears at, using the same logic as  
PhraseScorer.  This is what allows KinoSearch's Highlighter to handle  
phrases properly.

    http://www.rectangular.com/cgi-bin/uscon_search.cgi?q=%22united 
+states%22
    http://lucenebook.com/search?query=%22united+states%22

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


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