lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Add ability to get list of terms from a query
Date Thu, 07 Feb 2002 20:41:16 GMT

I just added the Highlight terms functionality by Maik Schreiber to the 
contributions section.
This code essentially gets all the terms for a given query, and then 
provides an interface to highlight the text.

In order to provide this functionality he had to make some changes to 
the core Lucene code.

I am suggesting providing the a query.getTerms() method. After review 
and Maik approval, we might even want to use his code.

I would suggest making these changes after 1.2 is released.

To check out his code and PDF describing the changes, go to

Please provide feedback.



He documented it very well. Here are the list of changes. - add the following method:
public BooleanClause[] getClauses()
return (BooleanClause[]) clauses.toArray(new BooleanClause[0]);
} - mark getQuery() public - add the following method:
public Term[] getTerms()
return (Term[]) terms.toArray(new Term[0]);
} - mark getQuery() public - mark getQuery() public - add the following method:
public Term getTerm()
return term;

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message