Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="searchText"></param>
        /// <param name="useWildcards">ignored, as wildcards are always possible</param>
        /// <param name="indexType"></param>
        /// <returns></returns>
        public override ISearchResults Search(string searchText, bool useWildcards, string indexType)
        {
            var lookQuery = new LookQuery(this.Name)
            {
                TextQuery = new TextQuery()
                {
                    SearchText = searchText
                }
            };

            var lookResult = lookQuery.Search();

            return(lookResult);
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="searchParams"></param>
        /// <param name="maxResults"></param>
        /// <returns></returns>
        public override ISearchResults Search(ISearchCriteria searchParams, int maxResults)
        {
            var lookQuery = new LookQuery(this.Name)
            {
                ExamineQuery = searchParams
            };

            var lookSearchCriteria = searchParams as LookSearchCriteria;

            if (lookSearchCriteria != null)
            {
                lookQuery.ExamineQuery  = lookSearchCriteria.ExamineQuery;
                lookQuery.NodeQuery     = lookSearchCriteria.NodeQuery;
                lookQuery.NameQuery     = lookSearchCriteria.NameQuery;
                lookQuery.DateQuery     = lookSearchCriteria.DateQuery;
                lookQuery.TextQuery     = lookSearchCriteria.TextQuery;
                lookQuery.TagQuery      = lookSearchCriteria.TagQuery;
                lookQuery.LocationQuery = lookSearchCriteria.LocationQuery;
            }

            var lookResult = lookQuery.Search();

            return(lookResult);
        }