当前位置: 首页>>代码示例>>C#>>正文


C# FieldQuery.flatten方法代码示例

本文整理汇总了C#中Lucene.Net.Search.Vectorhighlight.FieldQuery.flatten方法的典型用法代码示例。如果您正苦于以下问题:C# FieldQuery.flatten方法的具体用法?C# FieldQuery.flatten怎么用?C# FieldQuery.flatten使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lucene.Net.Search.Vectorhighlight.FieldQuery的用法示例。


在下文中一共展示了FieldQuery.flatten方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestFlatten1TermPhrase

 public void TestFlatten1TermPhrase()
 {
     Query query = PqF("A");
     FieldQuery fq = new FieldQuery(query, true, true);
     HashSet<Query> flatQueries = new HashSet<Query>();
     fq.flatten(query, flatQueries);
     AssertCollectionQueries(flatQueries, Tq("A"));
 }
开发者ID:Rationalle,项目名称:ravendb,代码行数:8,代码来源:FieldQueryTest.cs

示例2: TestFlattenTermAndPhrase

 public void TestFlattenTermAndPhrase()
 {
     Query query = paW.Parse("A AND \"B C\"");
     FieldQuery fq = new FieldQuery(query, true, true);
     HashSet<Query> flatQueries = new HashSet<Query>();
     fq.flatten(query, flatQueries);
     AssertCollectionQueries(flatQueries, Tq("A"), PqF("B", "C"));
 }
开发者ID:Rationalle,项目名称:ravendb,代码行数:8,代码来源:FieldQueryTest.cs

示例3: TestFlattenTermAndPhrase2gram

 public void TestFlattenTermAndPhrase2gram()
 {
     Query query = paB.Parse("AA AND BCD OR EFGH");
     FieldQuery fq = new FieldQuery(query, true, true);
     HashSet<Query> flatQueries = new HashSet<Query>();
     fq.flatten(query, flatQueries);
     AssertCollectionQueries(flatQueries, Tq("AA"), PqF("BC", "CD" ), PqF("EF", "FG", "GH"));
 }
开发者ID:Rationalle,项目名称:ravendb,代码行数:8,代码来源:FieldQueryTest.cs

示例4: testFlattenDisjunctionMaxQuery

 public void testFlattenDisjunctionMaxQuery()
 {
     Query query = Dmq(Tq("A"), Tq("B"), PqF("C", "D"));
     FieldQuery fq = new FieldQuery(query, true, true);
     HashSet<Query> flatQueries = new HashSet<Query>();
     fq.flatten(query, flatQueries);
     AssertCollectionQueries(flatQueries, Tq("A"), Tq("B"), PqF("C", "D"));
 }
开发者ID:Rationalle,项目名称:ravendb,代码行数:8,代码来源:FieldQueryTest.cs

示例5: TestFlattenBoolean

 public void TestFlattenBoolean()
 {
     Query query = paW.Parse("A AND B OR C NOT (D AND E)");
     FieldQuery fq = new FieldQuery(query, true, true);
     HashSet<Query> flatQueries = new HashSet<Query>();
     fq.flatten(query, flatQueries);
     AssertCollectionQueries(flatQueries, Tq("A"), Tq("B"), Tq("C"));
 }
开发者ID:Rationalle,项目名称:ravendb,代码行数:8,代码来源:FieldQueryTest.cs

示例6: TestFlattenPrefixQueryWithAnd

 public void TestFlattenPrefixQueryWithAnd()
 {
     Query query = paW.Parse("Ter* AND Pre*");
     FieldQuery fq = new FieldQuery(query, true, true);
     HashSet<Query> flatQueries = new HashSet<Query>();
     fq.flatten(query, flatQueries);
     AssertCollectionQueries(flatQueries, Preq("ter"), Preq("pre"));
 }
开发者ID:raol,项目名称:lucene.net,代码行数:8,代码来源:FieldQueryTest.cs

示例7: TestFlattenSpanQuery

        public void TestFlattenSpanQuery()
        {
            var clauses = new SpanQuery[] 
            {
                new SpanTermQuery(new Term(F, "a")),
                new SpanTermQuery(new Term(F, "b")),
                new SpanTermQuery(new Term(F, "c")),
            };

            var query = new SpanNearQuery(clauses, 3, true);
            var fieldQuery = new FieldQuery(query, true, true);
            var flatQueries = new HashSet<Query>();
            fieldQuery.flatten(query, flatQueries);
            AssertCollectionQueries(flatQueries, Tq("a"), Tq("b"), Tq("c"));
        }
开发者ID:raol,项目名称:lucene.net,代码行数:15,代码来源:FieldQueryTest.cs

示例8: TestFlattenMultiPhraseQuery

        public void TestFlattenMultiPhraseQuery()
        {
            var query = new MultiPhraseQuery();
            query.Add(new[] { new Term(F, "a1"), new Term(F, "a2") });
            query.Add(new[] { new Term(F, "b1"), new Term(F, "b2") });

            var fieldQuery = new FieldQuery(query, true, true);
            var flatQueries = new HashSet<Query>();
            fieldQuery.flatten(query, flatQueries);
            AssertCollectionQueries(flatQueries, Tq("a1"), Tq("a2"), Tq("b1"), Tq("b2"));
        }
开发者ID:raol,项目名称:lucene.net,代码行数:11,代码来源:FieldQueryTest.cs


注:本文中的Lucene.Net.Search.Vectorhighlight.FieldQuery.flatten方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。