From 1a9c5d6b15e1f2e6674fc6196778189beb8d4515 Mon Sep 17 00:00:00 2001 From: kimchy Date: Tue, 6 Apr 2010 15:54:03 +0300 Subject: [PATCH] Range filter gt is broken, closes #119. --- .../index/query/json/RangeJsonFilterParser.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/RangeJsonFilterParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/RangeJsonFilterParser.java index 0340f7a2e3e..70300ddd294 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/RangeJsonFilterParser.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/json/RangeJsonFilterParser.java @@ -100,6 +100,13 @@ public class RangeJsonFilterParser extends AbstractIndexComponent implements Jso } else { includeUpper = token == JsonToken.VALUE_TRUE; } + } else if ("gt".equals(currentFieldName)) { + if (jp.getCurrentToken() == JsonToken.VALUE_NULL) { + from = null; + } else { + from = jp.getText(); + } + includeLower = false; } else if ("gte".equals(currentFieldName)) { if (jp.getCurrentToken() == JsonToken.VALUE_NULL) { from = null;