der within a thread, the others may be affected. With
>> that, what can I do within a thread to reopen a new reader?
>> >
>> >
>> > -- Original --
>> > From: "Ian Lea";
>> > Date: Fri, Jan 13, 2012 05:47
I do within a thread to reopen a new reader?
> >
> >
> > -- Original --
> > From: "Ian Lea";
> > Date: Fri, Jan 13, 2012 05:47 PM
> > To: "java-user";
> >
> > Subject: Re: Is it necessary to create a new
ad, the others may be affected. With that,
> what can I do within a thread to reopen a new reader?
>
>
> -- Original --
> From: "Ian Lea";
> Date: Fri, Jan 13, 2012 05:47 PM
> To: "java-user";
>
> Subject: Re: Is it nece
?
-- Original --
From: "Ian Lea";
Date: Fri, Jan 13, 2012 05:47 PM
To: "java-user";
Subject: Re: Is it necessary to create a new searcher?
The javadocs for openIfChanged say that it returns null if not
changed, so I don't think your code will work as is. You
The javadocs for openIfChanged say that it returns null if not
changed, so I don't think your code will work as is. You need to
check the return value and you'll need to close the old reader if you
have been given a new one.
If you are going to be reopening if changed, there seems little point
in
I am currently using the following statement at the end of each index
writing, although I don't know if the writing modifies the indexes or not:
is = new IndexSearcher(IndexReader.openIfChanged(ir));
# is -> IndexSearcher, ir-> IndexReader
My question is how expensive to create a searcher insta