Examples of QueryWrapperFilter


Examples of org.apache.lucene.search.QueryWrapperFilter

          Query selectionGroupQuery = createSelectionGroupQuery( selection );
          boolQuery.add( selectionGroupQuery, BooleanClause.Occur.MUST );
        }
      }
      if ( boolQuery.getClauses().length > 0 ) {
        this.facetFilter = new QueryWrapperFilter( boolQuery );
      }
    }
    return facetFilter;
  }
View Full Code Here

Examples of org.apache.lucene.search.QueryWrapperFilter

  public DistanceFilter(Filter previousFilter, Coordinates centerCoordinates, double radius, String coordinatesField) {
    if ( previousFilter != null ) {
      this.previousFilter = previousFilter;
    }
    else {
      this.previousFilter = new QueryWrapperFilter( new MatchAllDocsQuery() );
    }
    this.center = Point.fromCoordinates( centerCoordinates );
    this.radius = radius;
    this.coordinatesField = coordinatesField;
  }
View Full Code Here

Examples of org.apache.lucene.search.QueryWrapperFilter

  public DistanceFilter(Filter previousFilter, Coordinates centerCoordinates, double radius, String latitudeField, String longitudeField) {
    if ( previousFilter != null ) {
      this.previousFilter = previousFilter;
    }
    else {
      this.previousFilter = new QueryWrapperFilter( new MatchAllDocsQuery() );
    }
    this.center = Point.fromCoordinates( centerCoordinates );
    this.radius = radius;
    this.coordinatesField = null;
    this.latitudeField = latitudeField;
View Full Code Here

Examples of org.apache.lucene.search.QueryWrapperFilter

   * @return Lucene Query to be used in a search
   * @see Query
   * @see org.hibernate.search.spatial.Coordinates
   */
  public static Query buildDistanceQuery(Coordinates center, double radius, String fieldName) {
    Filter allFilter = new QueryWrapperFilter( new MatchAllDocsQuery() );
    return new FilteredQuery( new MatchAllDocsQuery(), buildDistanceFilter( allFilter, center, radius, fieldName ) );
  }
View Full Code Here

Examples of org.apache.lucene.search.QueryWrapperFilter

    boxQuery.add( longQuery, BooleanClause.Occur.MUST );

    return new FilteredQuery(
        new MatchAllDocsQuery(),
        buildDistanceFilter(
            new QueryWrapperFilter( boxQuery ),
            center,
            radius,
            latitudeFieldName,
            longitudeFieldName
        )
View Full Code Here

Examples of org.apache.lucene.search.QueryWrapperFilter

    finalQuery.setBoost( boost * finalQuery.getBoost() );
    if ( filter != null ) {
      finalQuery = new FilteredQuery(finalQuery, filter);
    }
    if ( constantScore ) {
      finalQuery = new ConstantScoreQuery( new QueryWrapperFilter( finalQuery ) );
    }
    return finalQuery;
  }
View Full Code Here

Examples of org.apache.lucene.search.QueryWrapperFilter

          Query selectionGroupQuery = createSelectionGroupQuery( selection );
          boolQuery.add( selectionGroupQuery, BooleanClause.Occur.MUST );
        }
      }
      if ( boolQuery.getClauses().length > 0 ) {
        this.facetFilter = new QueryWrapperFilter( boolQuery );
      }
    }
    return facetFilter;
  }
View Full Code Here

Examples of org.apache.lucene.search.QueryWrapperFilter

   }

   @Factory
   public Filter getFilter() {
      Query query = new TermQuery(new Term("blurb", blurbText));
      return new CachingWrapperFilter(new QueryWrapperFilter(query));
   }
View Full Code Here

Examples of org.apache.lucene.search.QueryWrapperFilter

   }

   @Factory
   public Filter getFilter() {
      Query query = new TermQuery(new Term("age", age.toString()));
      return new CachingWrapperFilter(new QueryWrapperFilter(query));
   }
View Full Code Here

Examples of org.apache.lucene.search.QueryWrapperFilter

    final Filter fastMatchFilter;
    final AtomicBoolean filterWasUsed = new AtomicBoolean();
    if (random().nextBoolean()) {
      // Sort of silly:
      fastMatchFilter = new CachingWrapperFilter(new QueryWrapperFilter(new MatchAllDocsQuery())) {
          @Override
          protected DocIdSet cacheImpl(DocIdSetIterator iterator, AtomicReader reader)
            throws IOException {
            final FixedBitSet cached = new FixedBitSet(reader.maxDoc());
            filterWasUsed.set(true);
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.