protected LuceneSearchQueryBase(CustomMultiFieldQueryParser queryParser, string category, string[] fields, LuceneSearchOptions searchOptions, BooleanOperation occurance) { Category = category; AllFields = fields ?? throw new ArgumentNullException(nameof(fields)); SearchOptions = searchOptions; Queries.Push(new BooleanQuery()); BooleanOperation = occurance; _queryParser = queryParser; }
protected LuceneSearchQueryBase( string category, Analyzer analyzer, string[] fields, LuceneSearchOptions searchOptions, BooleanOperation occurance) { Category = category; AllFields = fields ?? throw new ArgumentNullException(nameof(fields)); SearchOptions = searchOptions; Queries.Push(new BooleanQuery()); BooleanOperation = occurance; _queryParser = new CustomMultiFieldQueryParser(LuceneVersion, fields, analyzer); _queryParser.AllowLeadingWildcard = searchOptions.AllowLeadingWildcard; }