public DefaultReversedSearchEngine( IIndexNameProvider indexNameProvider, IEsSearcher <TestModel> searcher) : base(indexNameProvider, searcher, new SimpleSearchStrategy()) { DefaultSort = new RevertSort(); }
public SingleDigitTermDefaultFilteredSearchEngine( IIndexNameProvider indexNameProvider, IEsSearcher <TestModel> searcher) : base(indexNameProvider, searcher, new SimpleSearchStrategy()) { DefaultFilter = new SingleDigitTermFilter(); }
/// <summary> /// Initializes a new instance of <see cref="SearchEngine"/> /// </summary> public EsSearchEngine(IIndexNameProvider indexNameProvider, IEsSearcher <TDoc> searcher, IEsSearchEngineStrategy <TDoc> defaultStrategy) { _indexName = indexNameProvider.Provide <TDoc>(); _searcher = searcher ?? throw new ArgumentNullException(nameof(searcher)); _defaultStrategy = defaultStrategy; }
public EsSearcherBehavior(ClientFixture clFx, ITestOutputHelper output) { _clFx = clFx; _output = output; _searcher = new EsSearcher <TestEntity>(new SingleEsClientProvider(_clFx.EsClient), null, (ElasticsearchOptions)null); _indexer = new EsIndexer <TestEntity>(new SingleEsClientProvider(_clFx.EsClient), null, (ElasticsearchOptions)null); }
public SimpleSearchEngine( IIndexNameProvider indexNameProvider, IEsSearcher <TestModel> searcher) : base(indexNameProvider, searcher, new SimpleSearchStrategy()) { RegisterNamedFilter("single-digit", new SingleDigitTermFilter()); RegisterNamedSort("revert", new RevertSort()); RegisterNamedSort("norm", new NormSort()); }
public SearchEngineWithStrategyPredefinedFilter( IIndexNameProvider indexNameProvider, IEsSearcher <TestModel> searcher) : base(indexNameProvider, searcher, new WithPredefinedFilterSearchStrategy()) { }