Package org.apache.lucene.search.join

Examples of org.apache.lucene.search.join.RawTermFilter


    w.close();
    IndexSearcher s = newSearcher(r, false);

    // Create a filter that defines "parent" documents in
    // the index - in this case resumes
    final Filter parentsFilter = new CachingWrapperFilter(new RawTermFilter(new Term("docType", "resume")),
                                                          CachingWrapperFilter.DeletesMode.IGNORE);

    // Define child document criteria (finds an example of relevant work experience)
    BooleanQuery childQuery = new BooleanQuery();
    childQuery.add(new BooleanClause(new TermQuery(new Term("skill", "java")), Occur.MUST));
View Full Code Here


    IndexReader r = w.getReader();
    w.close();
    IndexSearcher s = newSearcher(r, false);

    // Create a filter that defines "parent" documents in the index - in this case resumes
    final Filter parentsFilter = new CachingWrapperFilter(new RawTermFilter(new Term("docType", "resume")),
                                                          CachingWrapperFilter.DeletesMode.IGNORE);

    // Define child document criteria (finds an example of relevant work experience)
    BooleanQuery childQuery = new BooleanQuery();
    childQuery.add(new BooleanClause(new TermQuery(new Term("skill", "java")), Occur.MUST));
View Full Code Here

    final IndexSearcher s = newSearcher(r, false);
    s.setDefaultFieldSortScoring(true, true);

    final IndexSearcher joinS = newSearcher(joinR, false);

    final Filter parentsFilter = new CachingWrapperFilter(new RawTermFilter(new Term("isParent", "x")),
                                                          CachingWrapperFilter.DeletesMode.IGNORE);

    final int iters = 200*RANDOM_MULTIPLIER;

    for(int iter=0;iter<iters;iter++) {
View Full Code Here

    IndexReader r = w.getReader();
    w.close();
    IndexSearcher s = newSearcher(r, false);

    // Create a filter that defines "parent" documents in the index - in this case resumes
    final Filter parentsFilter = new CachingWrapperFilter(new RawTermFilter(new Term("docType", "resume")),
                                                          CachingWrapperFilter.DeletesMode.IGNORE);

    // Define child document criteria (finds an example of relevant work experience)
    BooleanQuery childJobQuery = new BooleanQuery();
    childJobQuery.add(new BooleanClause(new TermQuery(new Term("skill", "java")), Occur.MUST));
View Full Code Here

    w.addDocuments(Arrays.asList(childDoc, parentDoc));
    IndexReader r = w.getReader();
    w.close();
    IndexSearcher s = newSearcher(r, false);
    Query tq = new TermQuery(new Term("child", "1"));
    final Filter parentsFilter = new CachingWrapperFilter(new RawTermFilter(new Term("parent", "1")),
                                                          CachingWrapperFilter.DeletesMode.IGNORE);

    ToParentBlockJoinQuery q = new ToParentBlockJoinQuery(tq, parentsFilter, ToParentBlockJoinQuery.ScoreMode.Avg);
    Weight weight = s.createNormalizedWeight(q);
   
View Full Code Here

    w.forceMerge(1);
    IndexReader r = w.getReader();
    w.close();
    IndexSearcher s = newSearcher(r, false);
    Query tq = new TermQuery(new Term("child", "2"));
    final Filter parentsFilter = new CachingWrapperFilter(new RawTermFilter(new Term("isparent", "yes")),
                                                          CachingWrapperFilter.DeletesMode.IGNORE);

    ToParentBlockJoinQuery q = new ToParentBlockJoinQuery(tq, parentsFilter, ToParentBlockJoinQuery.ScoreMode.Avg);
    Weight weight = s.createNormalizedWeight(q);
    final IndexReader[] subs = s.getIndexReader().getSequentialSubReaders();
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.join.RawTermFilter

Copyright © 2018 www.massapicom. 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.