Index: trunk/src/org/openstreetmap/josm/actions/search/PushbackTokenizer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/PushbackTokenizer.java	(revision 6428)
+++ trunk/src/org/openstreetmap/josm/actions/search/PushbackTokenizer.java	(revision 6429)
@@ -59,5 +59,5 @@
         RIGHT_PARENT(marktr("<right parent>")), COLON(marktr("<colon>")), EQUALS(marktr("<equals>")),
         KEY(marktr("<key>")), QUESTION_MARK(marktr("<question mark>")),
-        EOF(marktr("<end-of-file>"));
+        EOF(marktr("<end-of-file>")), LESS_THAN("<less-than>"), GREATER_THAN("<greater-than>");
 
         private Token(String name) {
@@ -82,6 +82,6 @@
     }
 
-    private static final List<Character> specialChars = Arrays.asList(new Character[] {'"', ':', '(', ')', '|', '^', '=', '?'});
-    private static final List<Character> specialCharsQuoted = Arrays.asList(new Character[] {'"'});
+    private static final List<Character> specialChars = Arrays.asList('"', ':', '(', ')', '|', '^', '=', '?', '<', '>');
+    private static final List<Character> specialCharsQuoted = Arrays.asList('"');
 
     private String getString(boolean quoted) {
@@ -134,4 +134,10 @@
             getChar();
             return Token.EQUALS;
+        case '<':
+            getChar();
+            return Token.LESS_THAN;
+        case '>':
+            getChar();
+            return Token.GREATER_THAN;
         case '(':
             getChar();
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 6428)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 6429)
@@ -395,4 +395,5 @@
                 .addKeyword("*=<i>value</i>", null, tr("''value'' in any key"))
                 .addKeyword("<i>key</i>=", null, tr("matches if ''key'' exists"))
+                .addKeyword("<i>key</i>><i>value</i>", null, tr("matches if ''key'' is greater than ''value'' (analogously, less than)"))
                 , GBC.eol());
         right.add(new SearchKeywordRow(hcbSearchString)
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 6428)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 6429)
@@ -28,4 +28,5 @@
 import org.openstreetmap.josm.tools.DateUtils;
 import org.openstreetmap.josm.tools.Geometry;
+import org.openstreetmap.josm.tools.Predicate;
 
 /**
@@ -207,5 +208,5 @@
      * Base class for all search operators.
      */
-    abstract public static class Match {
+    abstract public static class Match implements Predicate<OsmPrimitive> {
 
         abstract public boolean match(OsmPrimitive osm);
@@ -231,4 +232,9 @@
             }
             return true;
+        }
+
+        @Override
+        public final boolean evaluate(OsmPrimitive object) {
+            return match(object);
         }
     }
@@ -515,4 +521,30 @@
         }
         @Override public String toString() {return key+"="+value;}
+    }
+
+    public static class ValueComparison extends Match {
+        private final String key;
+        private final String referenceValue;
+        private final int compareMode;
+
+        public ValueComparison(String key, String referenceValue, int compareMode) {
+            this.key = key;
+            this.referenceValue = referenceValue;
+            this.compareMode = compareMode;
+        }
+
+        @Override
+        public boolean match(OsmPrimitive osm) {
+            int compareResult;
+            try {
+                compareResult = Double.compare(
+                        Double.parseDouble(osm.get(key)),
+                        Double.parseDouble(referenceValue)
+                );
+            } catch (Exception ignore) {
+                compareResult = osm.get(key).compareTo(referenceValue);
+            }
+            return compareMode < 0 ? compareResult < 0 : compareMode > 0 ? compareResult > 0 : compareResult == 0;
+        }
     }
 
@@ -1231,7 +1263,11 @@
             // factor consists of key:value or key=value
             String key = tokenizer.getText();
-            if (tokenizer.readIfEqual(Token.EQUALS))
+            if (tokenizer.readIfEqual(Token.EQUALS)) {
                 return new ExactKeyValue(regexSearch, key, tokenizer.readTextOrNumber());
-            else if (tokenizer.readIfEqual(Token.COLON)) {
+            } else if (tokenizer.readIfEqual(Token.LESS_THAN)) {
+                return new ValueComparison(key, tokenizer.readTextOrNumber(), -1);
+            } else if (tokenizer.readIfEqual(Token.GREATER_THAN)) {
+                return new ValueComparison(key, tokenizer.readTextOrNumber(), +1);
+            } else if (tokenizer.readIfEqual(Token.COLON)) {
                 // see if we have a Match that takes a data parameter
                 SimpleMatchFactory factory = simpleMatchFactoryMap.get(key);
