Creates a searcher searching the index in the named directory. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the underlying IndexReader.

Namespace: Lucene.Net.Search
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public IndexSearcher(
	Directory path,
	bool readOnly
)
Visual Basic
Public Sub New ( _
	path As Directory, _
	readOnly As Boolean _
)
Visual C++
public:
IndexSearcher(
	Directory^ path, 
	bool readOnly
)

Parameters

path
Type: Lucene.Net.Store..::..Directory
directory where IndexReader will be opened
readOnly
Type: System..::..Boolean
if true, the underlying IndexReader will be opened readOnly

See Also