lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <>
Subject Re: IndexSearcher.close() removed in 4.0
Date Mon, 18 Feb 2013 22:20:45 GMT
On Mon, Feb 18, 2013 at 7:32 PM, saisantoshi <> wrote:
> I understand from the JIRA ticket(Lucene-3640) that the IndexSearcher.close()
> is no-op operation but not very clear on why it is a no-op? Could someone
> shed some light on this? We were using this method in the older versions and
> is it safe now to remove this call. Just want to understand the consequences
> before we make any changes? Is there any alternative that we need to use
> here?


previous version had a constructor that accepted a directory [1] if
you used this constructor IndexSearcher#close did also close the index
reader that was created. Since we removed this constructor we also
removed close since it's a no-op. IndexSearcher is just a wrapper to
add some functionality on top of the reader. You can ignore the
IS#close() if you closing the IndexReader properly.

> Thanks,
> Sai
> --
> View this message in context:
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message