Opened 12 years ago

Closed 12 years ago

#4314 closed defect (fixed)

Search regression: user:"foo" works, user:"foo bar" doesn't

Reported by: avarab@… Owned by: team
Priority: critical Milestone:
Component: Core Version: latest
Keywords: search Cc:


On r2766: The mock search object that SearchCompiler construct doesn't work for users with spaces in their names.

With this debugging patch:

--- (revision 2766)                                                                                                   
+++ (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 12 years ago by mjulius

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.