@Override
 public Query fuzzyQuery(
     String value,
     Fuzziness fuzziness,
     int prefixLength,
     int maxExpansions,
     boolean transpositions) {
   int iValue = Integer.parseInt(value);
   int iSim = fuzziness.asInt();
   return NumericRangeQuery.newIntRange(
       names.indexName(), precisionStep, iValue - iSim, iValue + iSim, true, true);
 }
Exemplo n.º 2
0
 @Override
 public Query fuzzyQuery(
     Object value,
     Fuzziness fuzziness,
     int prefixLength,
     int maxExpansions,
     boolean transpositions) {
   failIfNotIndexed();
   InetAddress base = parse(value);
   int mask = fuzziness.asInt();
   return XInetAddressPoint.newPrefixQuery(name(), base, mask);
 }