/// <summary> /// Create a new instance, loading from a previously built /// directory, if it exists. /// </summary> /// <param name="blenderType"> Type of blending strategy, see BlenderType for more precisions </param> /// <param name="numFactor"> Factor to multiply the number of searched elements before ponderate </param> /// <param name="commitOnBuild"> Call commit after the index has finished building. This /// would persist the suggester index to disk and future instances of this suggester can /// use this pre-built dictionary. </param> /// <exception cref="IOException"> If there are problems opening the underlying Lucene index. </exception> // LUCENENET specific - LUCENE-5889, a 4.11.0 feature. (Code moved from other constructor to here.) public BlendedInfixSuggester(LuceneVersion matchVersion, Directory dir, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int minPrefixChars, BlenderType blenderType, int numFactor, bool commitOnBuild) : base(matchVersion, dir, indexAnalyzer, queryAnalyzer, minPrefixChars, commitOnBuild) { this.blenderType = blenderType; this.numFactor = numFactor; }
/// <summary> /// Create a new instance, loading from a previously built /// directory, if it exists. /// </summary> public BlendedInfixSuggester(LuceneVersion matchVersion, Directory dir, Analyzer analyzer) : base(matchVersion, dir, analyzer) { this.blenderType = BlenderType.POSITION_LINEAR; this.numFactor = DEFAULT_NUM_FACTOR; }
/// <summary> /// Create a new instance, loading from a previously built /// directory, if it exists. /// </summary> /// <param name="blenderType"> Type of blending strategy, see BlenderType for more precisions </param> /// <param name="numFactor"> Factor to multiply the number of searched elements before ponderate </param> /// <exception cref="IOException"> If there are problems opening the underlying Lucene index. </exception> public BlendedInfixSuggester(Version matchVersion, Directory dir, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int minPrefixChars, BlenderType blenderType, int numFactor) : base(matchVersion, dir, indexAnalyzer, queryAnalyzer, minPrefixChars) { this.blenderType = blenderType; this.numFactor = numFactor; }
/// <summary> /// Create a new instance, loading from a previously built /// directory, if it exists. /// </summary> /// <param name="blenderType"> Type of blending strategy, see BlenderType for more precisions </param> /// <param name="numFactor"> Factor to multiply the number of searched elements before ponderate </param> /// <exception cref="IOException"> If there are problems opening the underlying Lucene index. </exception> // LUCENENET specific - LUCENE-5889, a 4.11.0 feature. calls new constructor with extra param. // LUCENENET TODO: Remove method at version 4.11.0. Was retained for perfect 4.8 compatibility public BlendedInfixSuggester(LuceneVersion matchVersion, Directory dir, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int minPrefixChars, BlenderType blenderType, int numFactor) : this(matchVersion, dir, indexAnalyzer, queryAnalyzer, minPrefixChars, blenderType, numFactor, commitOnBuild : false) { }