Package org.apache.lucene.search

Examples of org.apache.lucene.search.FilteredDocIdSet


    final String[] geoHashValues = FieldCache.DEFAULT.getStrings(reader, geoHashField);

    final int docBase = nextDocBase;
    nextDocBase += reader.maxDoc();

    return new FilteredDocIdSet(startingFilter.getDocIdSet(reader)) {
      @Override
      public boolean match(int doc) {
       
        String geoHash = geoHashValues[doc];
        double[] coords = GeoHashUtils.decode(geoHash);
View Full Code Here


    final double[] lngIndex = FieldCache.DEFAULT.getDoubles(reader, lngField);

    final int docBase = nextDocBase;
    nextDocBase += reader.maxDoc();

    return new FilteredDocIdSet(startingFilter.getDocIdSet(reader)) {
      @Override
      protected boolean match(int doc) {
        double x = latIndex[doc];
        double y = lngIndex[doc];
     
View Full Code Here

    if ( ( docs == null ) || ( docs.iterator() == null ) ) {
      return null;
    }

    return new FilteredDocIdSet( docs ) {
      @Override
      protected boolean match(int documentIndex) {

        if ( center.getDistanceTo( latitudeValues[documentIndex], longitudeValues[documentIndex] ) <= radius ) {
          return true;
View Full Code Here

    if ( ( docs == null ) || ( docs.iterator() == null ) ) {
      return null;
    }

    return new FilteredDocIdSet( docs ) {
      @Override
      protected boolean match(int documentIndex) {

        if ( center.getDistanceTo( latitudeValues[documentIndex], longitudeValues[documentIndex] ) <= radius ) {
          return true;
View Full Code Here

    if ( ( docs == null ) || ( docs.iterator() == null ) ) {
      return null;
    }

    return new FilteredDocIdSet( docs ) {
      @Override
      protected boolean match(int documentIndex) {

        if ( center.getDistanceTo( latitudeValues.get( documentIndex ), longitudeValues.get( documentIndex ) ) <= radius ) {
          return true;
View Full Code Here

    if ( ( docs == null ) || ( docs.iterator() == null ) ) {
      return null;
    }

    return new FilteredDocIdSet( docs ) {
      @Override
      protected boolean match(int documentIndex) {

        double documentDistance;
View Full Code Here

  }

  @Override
  public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException {
    final FunctionValues values = source.getValues( null, context );
    return new FilteredDocIdSet(startingFilter.getDocIdSet(context, acceptDocs)) {
      @Override
      public boolean match(int doc) {
        double val = values.doubleVal( doc );
        return val >= min && val <= max;
      }
View Full Code Here

    final double[] lngIndex = FieldCache.DEFAULT.getDoubles(reader, lngField);

    final int docBase = nextDocBase;
    nextDocBase += reader.maxDoc();

    return new FilteredDocIdSet(startingFilter.getDocIdSet(reader)) {
      protected boolean match(int doc) {
        double x = latIndex[doc];
        double y = lngIndex[doc];
     
        // round off lat / longs if necessary
View Full Code Here

    final String[] geoHashValues = FieldCache.DEFAULT.getStrings(reader, geoHashField);

    final int docBase = nextDocBase;
    nextDocBase += reader.maxDoc();

    return new FilteredDocIdSet(startingFilter.getDocIdSet(reader)) {
      public boolean match(int doc) {
       
        String geoHash = geoHashValues[doc];
        double[] coords = GeoHashUtils.decode(geoHash);
        double x = coords[0];
View Full Code Here

    if ( ( docs == null ) || ( docs.iterator() == null ) ) {
      return null;
    }

    return new FilteredDocIdSet( docs ) {
      @Override
      protected boolean match(int documentIndex) {

        if ( center.getDistanceTo( latitudeValues[documentIndex], longitudeValues[documentIndex] ) <= radius ) {
          return true;
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.FilteredDocIdSet

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.