示例#1
0
        public void BuildQuery()
        {
            var q = new Query
            {
                Children =
                {
                    new TermClause{ Field = "Title", Value = "kurt"},
                    new TermClause{ Field = "Text", Value = "kurt", Type = QueryClauseType.Required },
                    new BooleanClause
                    {
                        Type = QueryClauseType.Required,
                        Boost = .8f,
                        Children =
                        {
                            new TermClause{ Field = "Title", Value = "kurt"},
                            new TermClause{ Field = "Text", Value = "kurt" }
                        }
                    }
                }
            };

            Console.WriteLine(q.ToString());
        }
示例#2
0
 public SearchResults Search(Query query)
 {
     return this.searcher.Search(query);
 }