예제 #1
0
 public BoboFacetQuery(ISearchContext searchContext, string category, Analyzer analyzer, string[] fields, LuceneSearchOptions searchOptions, BooleanOperation occurance)
     : base(searchContext, category, analyzer, fields, searchOptions, occurance)
 {
     _searchContext = searchContext;
 }
예제 #2
0
        /// <summary>
        /// Creates an instance of SearchCriteria for the provider
        /// </summary>
        /// <param name="category">The type of data in the index.</param>
        /// <param name="defaultOperation">The default operation.</param>
        /// <param name="luceneAnalyzer"></param>
        /// <param name="searchOptions"></param>
        /// <returns></returns>
        public IQuery CreateQuery(string category, BooleanOperation defaultOperation, Analyzer luceneAnalyzer, LuceneSearchOptions searchOptions)
        {
            if (luceneAnalyzer == null)
            {
                throw new ArgumentNullException(nameof(luceneAnalyzer));
            }

            return(new LuceneSearchQuery(GetSearchContext(), category, luceneAnalyzer, GetAllIndexedFields(), searchOptions, defaultOperation));
        }
        public MultiFacetQuery(ISearchContext searchContext, string category, Analyzer analyzer, string[] fields, LuceneSearchOptions searchOptions, BooleanOperation occurance)
            : base(searchContext, category, analyzer, fields, searchOptions, occurance)
        {
            _searchContext = searchContext;

            _request = new MultiFacetRequest
            {
                Query  = Query,
                Sort   = SortFields,
                Config = FacetSearcherConfiguration.Default(),
                Facets = new List <FacetFieldInfo>()
            };
        }
예제 #4
0
        public BoboFacetQuery(ISearchContext searchContext, string category, Analyzer analyzer, string[] fields, LuceneSearchOptions searchOptions, BooleanOperation occurance)
            : base(searchContext, category, analyzer, fields, searchOptions, occurance)
        {
            _searchContext = searchContext;

            _request = new BoboFacetRequest
            {
                BrowseRequest = new BrowseRequest
                {
                    Query             = Query,
                    FetchStoredFields = true
                },
                FacetHandlers = new List <IFacetHandler>()
            };
        }