From 7ac90a792e5e06a1812b8cad7dda75081c0efa8c Mon Sep 17 00:00:00 2001 From: David Wayne Smiley Date: Mon, 17 Sep 2012 03:19:03 +0000 Subject: [PATCH] SOLR-3304 Solr adapters for the new Lucene 4 spatial module git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1386458 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/spatial/query/SpatialArgsParser.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java b/lucene/spatial/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java index 34a9ba9166d..0a4597e0b55 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java @@ -45,6 +45,9 @@ import java.util.StringTokenizer; */ public class SpatialArgsParser { + public static final String DIST_ERR_PCT = "distErrPct"; + public static final String DIST_ERR = "distErr"; + /** Writes a close approximation to the parsed input format. */ static String writeSpatialArgs(SpatialArgs args) { StringBuilder str = new StringBuilder(); @@ -90,8 +93,8 @@ public class SpatialArgsParser { body = v.substring(edx + 1).trim(); if (body.length() > 0) { Map aa = parseMap(body); - args.setDistErrPct(readDouble(aa.remove("distErrPct"))); - args.setDistErr(readDouble(aa.remove("distErr"))); + args.setDistErrPct(readDouble(aa.remove(DIST_ERR_PCT))); + args.setDistErr(readDouble(aa.remove(DIST_ERR))); if (!aa.isEmpty()) { throw new IllegalArgumentException("unused parameters: " + aa, null); }