Hi Greg, Sorry it was mistake, actually 'TEXT_FIELD' is constant in my code. Please find below the correct code-
Terms terms = MultiFields.getTerms(reader, "field"); TermsEnum termsEnum = terms.iterator(); Thanks, Mukul -----Original Message----- From: Greg Bowyer [mailto:gbow...@fastmail.co.uk] Sent: Friday, July 29, 2016 12:27 AM To: java-user@lucene.apache.org Subject: Re: get enumeration of all terms starting at a given term after lucene 4 I am confused by your example, MultiFields.get allows you to ask for a specific field. On Thu, Jul 28, 2016, at 09:00 AM, Mukul Ranjan wrote: > Hi All, > > How to get enumeration of all terms starting at a given term. I have > upgrade lucene version from lucene 3.6 to lucene 5.5.2. After 3.6, > indexReader terms api is removed which used to give list of terms. > I have used below code to get the termEnum, but it has no option to > pass the value of the field which is used to get the matching result. > > Terms terms = MultiFields.getTerms(reader, TEXT_FIELD); TermsEnum > termsEnum = terms.iterator(); > > Can anyone help me on this. > > Thanks, > Mukul Ranjan > ___ Watch an eGain Customer Service > Transformation<https://www.youtube.com/watch?v=dEwdFfWoyuE> Success > Story --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org ___ Watch an eGain Customer Service Transformation<https://www.youtube.com/watch?v=dEwdFfWoyuE> Success Story --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org