Ok, thanks a lot - I iwll try that tomorrow

Best,
Liat

2009/6/30 Simon Willnauer <[email protected]>

> Hi,
> On Sun, Jun 28, 2009 at 2:39 PM, liat oren<[email protected]> wrote:
> > Hi,
> >
> > I have an index that is a multi-segment index (how come it is created
> this
> > way?)
> >
> > When I try to get the freq of a term at the following way:
> >   TermDocs tDocs = this.indexReader.termDocs(term);
> >   tf = tDocs.freq();
> > the greq method :
> >  public int freq()
> >  {
> >   return current.freq();
> >  }
> > is in MultiSegmentReader.
> >
> > The current is null, so I get an exception.
> same answer as in the last email you must call TermDocs#next() this
> will set TermDocs#current
>
> TermDocs tDocs = this.indexReader.termDocs(term);
> tDocs.next()
>  tf = tDocs.freq();
>
> simon
> >
> > Should I initialize current?
> > How can I avoid this problem?
> > How can I avoid having a multi-segment index?
> >
> > Many thanks,
> > Liat
> >
>
>  ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to