static private Open ( Directory directory, |
||
directory | Directory | |
commit | ||
termInfosIndexDivisor | int | |
return |
internal DirectoryReader DoOpenIfChanged(SegmentInfos infos) { return(StandardDirectoryReader.Open(m_directory, infos, GetSequentialSubReaders().OfType <AtomicReader>().ToList(), termInfosIndexDivisor)); }
/// <summary> /// Expert: Returns a <see cref="IndexReader"/> reading the index in the given /// <see cref="Store.Directory"/> with the given termInfosIndexDivisor. </summary> /// <param name="directory"> the index directory </param> /// <param name="termInfosIndexDivisor"> Subsamples which indexed /// terms are loaded into RAM. this has the same effect as setting /// <see cref="LiveIndexWriterConfig.TermIndexInterval"/> (on <see cref="IndexWriterConfig"/>) except that setting /// must be done at indexing time while this setting can be /// set per reader. When set to N, then one in every /// N*termIndexInterval terms in the index is loaded into /// memory. By setting this to a value > 1 you can reduce /// memory usage, at the expense of higher latency when /// loading a TermInfo. The default value is 1. Set this /// to -1 to skip loading the terms index entirely. /// <b>NOTE:</b> divisor settings > 1 do not apply to all <see cref="Codecs.PostingsFormat"/> /// implementations, including the default one in this release. It only makes /// sense for terms indexes that can efficiently re-sample terms at load time. </param> /// <exception cref="IOException"> if there is a low-level IO error </exception> new public static DirectoryReader Open(Directory directory, int termInfosIndexDivisor) { return(StandardDirectoryReader.Open(directory, null, termInfosIndexDivisor)); }
/// <summary> /// Expert: returns an <see cref="IndexReader"/> reading the index in the given /// <seealso cref="Index.IndexCommit"/> and <paramref name="termInfosIndexDivisor"/>. </summary> /// <param name="commit"> the commit point to open </param> /// <param name="termInfosIndexDivisor"> Subsamples which indexed /// terms are loaded into RAM. this has the same effect as setting /// <see cref="LiveIndexWriterConfig.TermIndexInterval"/> (on <see cref="IndexWriterConfig"/>) except that setting /// must be done at indexing time while this setting can be /// set per reader. When set to N, then one in every /// N*termIndexInterval terms in the index is loaded into /// memory. By setting this to a value > 1 you can reduce /// memory usage, at the expense of higher latency when /// loading a TermInfo. The default value is 1. Set this /// to -1 to skip loading the terms index entirely. /// <b>NOTE:</b> divisor settings > 1 do not apply to all <see cref="Codecs.PostingsFormat"/> /// implementations, including the default one in this release. It only makes /// sense for terms indexes that can efficiently re-sample terms at load time. </param> /// <exception cref="IOException"> if there is a low-level IO error </exception> new public static DirectoryReader Open(IndexCommit commit, int termInfosIndexDivisor) { return(StandardDirectoryReader.Open(commit.Directory, commit, termInfosIndexDivisor)); }
/// <summary> /// Returns a <see cref="IndexReader"/> reading the index in the given /// <see cref="Store.Directory"/> </summary> /// <param name="directory"> the index directory </param> /// <exception cref="IOException"> if there is a low-level IO error </exception> new public static DirectoryReader Open(Directory directory) { return(StandardDirectoryReader.Open(directory, null, DEFAULT_TERMS_INDEX_DIVISOR)); }
/// <summary> /// Expert: returns an <see cref="IndexReader"/> reading the index in the given /// <see cref="Index.IndexCommit"/>. </summary> /// <param name="commit"> the commit point to open </param> /// <exception cref="IOException"> if there is a low-level IO error </exception> new public static DirectoryReader Open(IndexCommit commit) { return(StandardDirectoryReader.Open(commit.Directory, commit, DEFAULT_TERMS_INDEX_DIVISOR)); }