Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@apache.org Received: (qmail 29261 invoked from network); 15 Feb 2002 19:17:56 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 15 Feb 2002 19:17:56 -0000 Received: (qmail 27604 invoked by uid 97); 15 Feb 2002 19:17:58 -0000 Delivered-To: qmlist-jakarta-archive-lucene-dev@jakarta.apache.org Received: (qmail 27587 invoked by uid 97); 15 Feb 2002 19:17:58 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 27572 invoked from network); 15 Feb 2002 19:17:58 -0000 Errors-To: User-Agent: Microsoft-Entourage/10.0.0.1331 Date: Fri, 15 Feb 2002 11:17:43 -0800 Subject: Re: Add ability to get list of terms from a query From: Peter Carlson To: Lucene Developers List Message-ID: In-Reply-To: <089F1E2D-1C0B-11D6-89B8-0050E4C0B243@bookandhammer.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi All, I didn't get any feedback + or - on making these changes. I'll make the changes if people think it's a good idea. The changes essentially provide public methods to get the query or the term from the query. Thanks --Peter On 2/7/02 12:41 PM, "carlson@bookandhammer.com" wrote: > Hi, > > 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 > http://www.iq-computing.de/lucene/highlight.htm > > Please provide feedback. > > Thanks > > --Peter > > ----LIST OF SUGGESTED CHANGES---- > He documented it very well. Here are the list of changes. > > org.apache.lucene.search.BooleanQuery - add the following method: > public BooleanClause[] getClauses() > { > return (BooleanClause[]) clauses.toArray(new BooleanClause[0]); > } > > org.apache.lucene.search.MultiTermQuery - mark getQuery() public > > org.apache.lucene.search.PhraseQuery - add the following method: > public Term[] getTerms() > { > return (Term[]) terms.toArray(new Term[0]); > } > > org.apache.lucene.search.PrefixQuery - mark getQuery() public > > org.apache.lucene.search.RangeQuery - mark getQuery() public > > org.apache.lucene.search.TermQuery - add the following method: > public Term getTerm() > { > return term; > } > -- To unsubscribe, e-mail: For additional commands, e-mail: