/// <summary> Check whether the word exists in the index.</summary>
/// <param name="word">String
/// </param>
/// <throws> IOException </throws>
/// <returns> true iff the word exists in the index
/// </returns>
public virtual bool Exist(System.String word)
{
// obtainSearcher calls ensureOpen
IndexSearcher indexSearcher = ObtainSearcher();
try
{
return(indexSearcher.DocFreq(F_WORD_TERM.CreateTerm(word)) > 0);
}
finally
{
ReleaseSearcher(indexSearcher);
}
}