hi, i have been searching for getting the term enum for filtered documents...
I have index containing fields "group_id" and "user"..i know that we can
easily get unique Terms and their count for specific filed by following
code..

HashMap hmap= new HashMap();
TermEnum tenum= reader.terms(new Term("group_id"));
boolean next=true;

while(next==true && tenum.term().field().equals("group_id")){
       hmap.put(tenum.term().text(), tenum.docFreq());
       next=tenum.next();
}

but now problem is that i want to find unique term count on basis of some
filter...
e.g "I want to get users and their count in 'group_id:Java'  "

I can fulfill my requirement by iterating on documents whose "group_id:Java"
but this will slow down the process. Please guide me how to do this
efficiently... any other idea is highly appreciated :)
Thanks

-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-find-filtered-term-enum-tp2352751p2352751.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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

Reply via email to