Modify ↓
Opened 3 years ago
Closed 3 years ago
#4314 closed defect (fixed)
Search regression: user:"foo" works, user:"foo bar" doesn't
| Reported by: | avar | Owned by: | team |
|---|---|---|---|
| Priority: | critical | Component: | Core |
| Version: | latest | Keywords: | search |
| Cc: |
Description
On r2766: The mock search object that SearchCompiler construct doesn't work for users with spaces in their names.
With this debugging patch:
Index: SearchCompiler.java
===================================================================
--- SearchCompiler.java (revision 2766)
+++ SearchCompiler.java (working copy)
@@ -440,6 +440,8 @@
@Override public boolean match(OsmPrimitive osm) {
if (osm.getUser() == null && user == null) return true;
if (osm.getUser() == null) return false;
+
+ System.out.println("Matching '" + osm.getUser().getName() + "' against '" + user.getName() + "'");
return osm.getUser().equals(user);
}
I get things like:
Matching 'NaPTAN' against '' Matching 'Harry Wood' against 'NaPTAN'
When I searched for "Na PTAN" and "NaPTAN" respectively.
I'd just submit a patch to make it not construct that object, but it's probably needed for some reason.
Attachments (0)
Change History (1)
comment:1 Changed 3 years ago by mjulius
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.



(In [2768]) fixes #4314 - user:"foo" works, user:"foo bar" doesn't
fixed parsing of tokens in double quotes in PushbackTokenizer