public static Query create(QueryParseContext context,GeoPointFieldMapper.GeoPointFieldType fieldType,String geohash,@Nullable List<CharSequence> geohashes){
  MappedFieldType geoHashMapper=fieldType.geohashFieldType();
  if (geoHashMapper == null) {
    throw new IllegalArgumentException("geohash filter needs geohash_prefix to be enabled");
  }
  if (geohashes == null || geohashes.size() == 0) {
    return geoHashMapper.termQuery(geohash,context);
  }
 else {
    geohashes.add(geohash);
    return geoHashMapper.termsQuery(geohashes,context);
  }
}

public static Query create ( QueryParseContext context , GeoPointFieldMapper . GeoPointFieldType fieldType , String geohash , @ Nullable List < CharSequence > geohashes ) { MappedFieldType geoHashMapper = fieldType . geohashFieldType ( ) ; if ( geoHashMapper == null ) { throw new IllegalArgumentException ( "geohash filter needs geohash_prefix to be enabled" ) ; } if ( geohashes == null || geohashes . size ( ) == 0 ) { return geoHashMapper . termQuery ( geohash , context ) ; } else { geohashes . add ( geohash ) ; return geoHashMapper . termsQuery ( geohashes , context ) ; } }
create a new geohash filter for a given set of geohashes . in general this method returns a boolean filter combining the geohashes or - wise .
