Examples of topDocs()


Examples of org.apache.lucene.search.TopScoreDocCollector.topDocs()

            query.add( new TermQuery( new Term( RuleAttributeValueIndexTerm.TERM,
                                                "nonexistent" ) ),
                       BooleanClause.Occur.MUST );
            searcher.search( query,
                             collector );
            final ScoreDoc[] hits = collector.topDocs().scoreDocs;

            assertEquals( 0,
                          hits.length );

            ( (LuceneIndex) index ).nrtRelease( searcher );
View Full Code Here

Examples of org.apache.lucene.search.TopScoreDocCollector.topDocs()

            query.add( new TermQuery( new Term( RuleAttributeValueIndexTerm.TERM,
                                                "myruleflowgroup" ) ),
                       BooleanClause.Occur.MUST );
            searcher.search( query,
                             collector );
            final ScoreDoc[] hits = collector.topDocs().scoreDocs;

            assertEquals( 1,
                          hits.length );

            ( (LuceneIndex) index ).nrtRelease( searcher );
View Full Code Here

Examples of org.apache.lucene.search.TopScoreDocCollector.topDocs()

                                                                                true );
            final Query query = new QueryBuilder().addTerm( new ValueTypeIndexTerm( "org.drools.workbench.screens.drltext.backend.server.indexing.classes.Applicant" ) ).build();

            searcher.search( query,
                             collector );
            final ScoreDoc[] hits = collector.topDocs().scoreDocs;

            assertEquals( 2,
                          hits.length );

            ( (LuceneIndex) index ).nrtRelease( searcher );
View Full Code Here

Examples of org.apache.lucene.search.TopScoreDocCollector.topDocs()

                                                                                true );
            final Query query = new QueryBuilder().useWildcards().addTerm( new ValueTypeIndexTerm( "*.Applicant" ) ).build();

            searcher.search( query,
                             collector );
            final ScoreDoc[] hits = collector.topDocs().scoreDocs;

            assertEquals( 2,
                          hits.length );

            ( (LuceneIndex) index ).nrtRelease( searcher );
View Full Code Here

Examples of org.apache.lucene.search.TopScoreDocCollector.topDocs()

                                                                                true );
            final Query query = new QueryBuilder().addTerm( new ValueRuleAttributeIndexTerm( "ruleflow-group" ) ).addTerm( new ValueRuleAttributeValueIndexTerm( "myRuleFlowGroup" ) ).build();

            searcher.search( query,
                             collector );
            final ScoreDoc[] hits = collector.topDocs().scoreDocs;
            assertEquals( 1,
                          hits.length );

            final List<KObject> results = new ArrayList<KObject>();
            for ( int i = 0; i < hits.length; i++ ) {
View Full Code Here

Examples of org.apache.lucene.search.TopScoreDocCollector.topDocs()

                                                                                true );
            final Query query = new QueryBuilder().addTerm( new ValueRuleAttributeIndexTerm( "ruleflow-group" ) ).addTerm( new ValueRuleAttributeValueIndexTerm( "myAgendaGroup" ) ).build();

            searcher.search( query,
                             collector );
            final ScoreDoc[] hits = collector.topDocs().scoreDocs;
            assertEquals( 0,
                          hits.length );

            ( (LuceneIndex) index ).nrtRelease( searcher );
        }
View Full Code Here

Examples of org.apache.lucene.search.TopScoreDocCollector.topDocs()

                                                                                true );
            final Query query = new QueryBuilder().addTerm( new ValueRuleAttributeIndexTerm( "ruleflow-group" ) ).build();

            searcher.search( query,
                             collector );
            final ScoreDoc[] hits = collector.topDocs().scoreDocs;

            assertEquals( 1,
                          hits.length );

            ( (LuceneIndex) index ).nrtRelease( searcher );
View Full Code Here

Examples of org.apache.lucene.search.TopScoreDocCollector.topDocs()

                                                                                true );
            final Query query = new QueryBuilder().addTerm( new ValueRuleIndexTerm( "myRule" ) ).build();

            searcher.search( query,
                             collector );
            final ScoreDoc[] hits = collector.topDocs().scoreDocs;

            assertEquals( 1,
                          hits.length );

            ( (LuceneIndex) index ).nrtRelease( searcher );
View Full Code Here

Examples of org.apache.lucene.search.TopScoreDocCollector.topDocs()

                                                                                true );
            final Query query = new QueryBuilder().addTerm( new ValueTypeIndexTerm( "org.drools.workbench.screens.drltext.backend.server.indexing.classes.Applicant" ) ).build();

            searcher.search( query,
                             collector );
            final ScoreDoc[] hits = collector.topDocs().scoreDocs;

            assertEquals( 2,
                          hits.length );

            ( (LuceneIndex) index ).nrtRelease( searcher );
View Full Code Here

Examples of org.apache.lucene.search.TopScoreDocCollector.topDocs()

                                                                                true );
            final Query query = new QueryBuilder().useWildcards().addTerm( new ValueTypeIndexTerm( "*.Applicant" ) ).build();

            searcher.search( query,
                             collector );
            final ScoreDoc[] hits = collector.topDocs().scoreDocs;

            assertEquals( 2,
                          hits.length );

            ( (LuceneIndex) index ).nrtRelease( searcher );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.