[josm-dev] Ticket #485: Can't search for tag's which contain colons
Dirk Stöcker
openstreetmap at dstoecker.de
Thu Aug 14 21:28:42 BST 2008
On Thu, 14 Aug 2008, Florian Heer wrote:
> Another day (uhm... night), another bug fix.
>
> The attached patch fixes #485, but might need a bit of explanation to the
> user.
>
> In the search-gui, I have introduced a new CheckBox, labelled "use = instead
> of : for key/value separation".
> If checked, the search works slighty different. "=" instead of ":" is used as
> a token to separate key and value.
>
> So, if you have a tagging a) "test1:test2=yo" and b) "test1=test2"
>
> searching can be done by ticking the checkbox. Searches for "test1:test2"
> will find tagging a) if the new checkbox is clicked and tagging b) ("classic"
> search) if you don't click the box. Searching for "test1:test2=yo" with the
> new way will of course find tagging a) as well.
I don't think that's a good idea. It is very unintuitive.
Better would probably be a distinction between normal search and a power
search (e.g. using regular expressions).
Regarding the ':'. Why not switching to '=' for the standard method at
all? Usually tags have no '=', but very often they have ':'.
A good combination would be supporting // as regexp, so
xxx=yyy searches for key xxx equal to yyy, but
/xxx/=yyy searches for regexp xxx value yyy and
/xxx/=/yyy/ searches with two regexps.
If there is no =, then key and value are searched for the text.
Anyway the search seems to need some reworking:
- remember last settings of search buttons
- remember last searches
- easy repeating of last search
- The helptext-tooltip needs to describe full functionality.
Ciao
--
http://www.dstoecker.eu/ (PGP key available)
More information about the josm-dev
mailing list