Opened 4 years ago
Closed 4 years ago
#20981 closed defect (invalid)
regex search query fails to find features
Reported by: | tguen | Owned by: | tguen |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | search regex | Cc: |
Description (last modified by )
What steps will reproduce the problem?
- Download data from the query:
rel(7709227);map_to_area; way(area)[highway]; (._;>;);out meta;
- Press ctrl+f, then type:
name~Southwest
- Run this query at overpass-turbo.eu and compare the results
rel(7709227);map_to_area; way(area)[highway][name~Southwest]; out geom;
What is the expected result?
JOSM should select the same data that the latter query returns
What happens instead?
JOSM selects nothing
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-04-27 20:35:33 +0200 (Tue, 27 Apr 2021) Revision:17833 Build-Date:2021-04-27 21:58:39 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (17833 en) Linux Arch Linux Memory Usage: 150 MB / 3984 MB (38 MB allocated, but free) Java version: 15.0.2+7, N/A, OpenJDK 64-Bit Server VM Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel Screen: :0.0 2560×1440 (scaling 1.00×1.00) Maximum Screen Size: 2560×1440 Best cursor sizes: 16×16→16×16, 32×32→32×32 Environment variable LANG: en_US.UTF-8 System property file.encoding: ANSI_X3.4-1968 System property sun.jnu.encoding: ANSI_X3.4-1968 Locale info: en_US Numbers with default locale: 1234567890 -> 1234567890 Desktop environment: KDE VM arguments: [-Djosm.restart=true, -Dawt.useSystemAAFontSettings=on] Dataset consistency test: No problems found
Attachments (0)
Change History (5)
comment:1 by , 4 years ago
Description: | modified (diff) |
---|---|
Keywords: | search regex added |
comment:2 by , 4 years ago
Description: | modified (diff) |
---|
comment:3 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:4 by , 4 years ago
Yes, those both work for me. The problem is I assumed that JOSM uses the same flavor of regex as Overpass, i.e. "$Southwest " instead of "Southwest .*". That seems reasonable to me, especially because you can write Overpass queries in the download window, so there is different syntax used in different places. I don't see any indication that the search feature would work differently.
name:Southwest
: I didn't know this syntax was an option. I see now that it's listed in the search window, but it's so cluttered that it's hard to read. I think it could benefit from a redesign, but I'm afraid I don't have any suggestions. UI design is not my strong point. The current search window doesn't feel right though. ¯\_(ツ)_/¯
comment:5 by , 4 years ago
Resolution: | → invalid |
---|---|
Status: | needinfo → closed |
If I get this right, you are searching for any object which has "Southwest" within
name=*
, am I right?Following works for me with standard search syntax:
name:Southwest
orname~.*Southwest.*
With the regular expression syntax
name=.*Southwest.*
give the proper result.