Opened 12 years ago

Last modified 7 years ago

#7364 new enhancement

Search snippets for frequently used sub-queries

Reported by: joshdoe Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: search snippets Cc: michael2402


I'd find it useful to save frequently used sub-queries for reuse. Think of some search queries you perform often, but in combination with other queries. For example, highways could expand to highway=motorway | highway=motorway_link | highway=secondary | .... Somewhat frequently I'll want to select the current objects, and all parents and children, so mysearchsnippet could expand to child selected | parent selected | selected. We'd need to have some way to trigger these snippets, possibly by prefixing the word with a special character. We'd also need to have a way to edit these snippets, likely in their own separate dialog.

Attachments (1)

search-snippets.png (123.0 KB ) - added by bafonins 7 years ago.
Example of the search dialog including snippets

Download all attachments as: .zip

Change History (5)

by bafonins, 7 years ago

Attachment: search-snippets.png added

Example of the search dialog including snippets

comment:1 by bafonins, 7 years ago

We can extend the search dialog by adding extra section with a list of snippets added by the user. Something like this :
Example of the search dialog including snippets
I see it working as follows, the user is able to add any sub-queries he/she wants and save them. When double-clicking on any of them, a search query saved previously is simply appended to the search text field. Will it solve the problem?
It also could be possible to extend this solution in the future to define a set of placeholder elements (some specific keywords the user can define for his/her sub-queries) that can be used within the search text field.

comment:2 by bafonins, 7 years ago

And, of course, it should be a part of the expert mode

comment:3 by michael2402, 7 years ago

Cc: michael2402 added

comment:4 by stoecker, 7 years ago

Please explain use cases for this which cannot be solved by the search history or search bookmarks in toolbar.

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to joshdoe.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.