コード例 #1
0
        /// <summary>
        /// Gets results that match the given query
        /// </summary>
        /// <param name="text">Search Query</param>
        /// <returns></returns>
        public virtual IEnumerable <IFullTextSearchResult> Match(string text)
        {
            LucSearch.Query q         = this._parser.Parse(text);
            DocCollector    collector = new DocCollector();

            this._searcher.Search(q, collector);
            return(from doc in collector.Documents
                   select this._searcher.Doc(doc.Key).ToResult(doc.Value, this._schema));
        }
コード例 #2
0
        /// <summary>
        /// Gets results that match the given query
        /// </summary>
        /// <param name="graphUris">Graph URIs</param>
        /// <param name="text">Search Query</param>
        /// <returns></returns>
        public virtual IEnumerable <IFullTextSearchResult> Match(IEnumerable <Uri> graphUris, string text)
        {
            this.EnsureCurrent();
            LucSearch.Query q         = this._parser.Parse(text);
            DocCollector    collector = new DocCollector();

            this._searcher.Search(q, collector);
            IEnumerable <IFullTextSearchResult> results = from doc in collector.Documents
                                                          select this._searcher.Doc(doc.Key).ToResult(doc.Value, this._schema);

            return(this.FilterByGraph(graphUris, results));
        }
コード例 #3
0
 /// <summary>
 /// Gets results that match the given query
 /// </summary>
 /// <param name="text">Search Query</param>
 /// <returns></returns>
 public virtual IEnumerable<IFullTextSearchResult> Match(string text)
 {
     LucSearch.Query q = this._parser.Parse(text);
     DocCollector collector = new DocCollector();
     this._searcher.Search(q, collector);
     return (from doc in collector.Documents
             select this._searcher.Doc(doc.Key).ToResult(doc.Value, this._schema));
 }