lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: High frequency term for the searched query
Date Fri, 05 Nov 2010 07:41:44 GMT
It's there:

http://lucene.apache.org/java/3_0_2/api/core/org/apache/lucene/search/Query.
html#extractTerms(java.util.Set)


-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: starz10de [mailto:farag_ahmed@yahoo.com]
> Sent: Friday, November 05, 2010 8:28 AM
> To: java-user@lucene.apache.org
> Subject: Re: High frequency term for the searched query
> 
> 
> HI Chris,
> 
> I tried your solution and got one problem "the method
> extractterms(Set<Term>) is undefined for the type Query"
> 
> 
> this is the ocde:
> 
> Query query = QueryParser.parse(line, "contents", analyzer);
> 	//System.out.println("Searching for: " +
query.toString("contents"));
> 
> 	Hits hits = searcher.search(query);
> 
>        final Set<Term> terms = new HashSet<Term>();
> 
>         query = searcher.rewrite(query);
> 
> // the problem in this line
>  query.extractTerms(terms);
> 
>         for(Term t : terms){
>             int frequency = searcher.docFreq(t);
>         }
> 
> Thanks in advance
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/High-
> frequency-term-for-the-searched-query-tp1839942p1846781.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org



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


Mime
View raw message