コード例 #1
0
 public LuceneSearchQuery(
     ISearchContext searchContext,
     string category, Analyzer analyzer, string[] fields, LuceneSearchOptions searchOptions, BooleanOperation occurance)
     : base(CreateQueryParser(searchContext, fields, analyzer), category, fields, searchOptions, occurance)
 {
     _searchContext = searchContext;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }