Modify

Opened 11 years ago

Closed 11 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:

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 11 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
Action
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.