Index: trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 2566)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 2567)
@@ -124,4 +124,5 @@
                     + "<li>"+tr("<b>type:</b> - type of the object (<b>node</b>, <b>way</b>, <b>relation</b>)")+"</li>"
                     + "<li>"+tr("<b>user:</b>... - all objects changed by user")+"</li>"
+                    + "<li>"+tr("<b>user:anonymous</b> - all objects changed by anonymous users")+"</li>"
                     + "<li>"+tr("<b>id:</b>... - object with given ID (0 for new objects)")+"</li>"
                     + "<li>"+tr("<b>nodes:</b>... - object with given number of nodes")+"</li>"
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 2566)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 2567)
@@ -389,12 +389,17 @@
         private User user;
         public UserMatch(String user) {
-            List<User> users = User.getByName(user);
-            if (!users.isEmpty()) {
-                // selecting an arbitrary user
-                this.user = users.get(0);
-            } else {
-                user = null;
-            }
-        }
+            if (user.equals("anonymous")) {
+                this.user = null;
+            } else {
+                List<User> users = User.getByName(user);
+                if (!users.isEmpty()) {
+                    // selecting an arbitrary user
+                    this.user = users.get(0);
+                } else {
+                    this.user = User.createLocalUser(user);
+                }
+            }
+        }
+
         @Override public boolean match(OsmPrimitive osm) {
             if (osm.getUser() == null && user == null) return true;
@@ -402,4 +407,5 @@
             return osm.getUser().equals(user);
         }
+
         @Override public String toString() {
             return "user=" + user == null ? "" : user.getName();
