Support fine-grained search syntax
Closed this issue · 1 comments
Currently, a search query will match any part of a contact's card. It would be nice to be able to search a specific property, for example, search for "Berkeley" in the "Location" field only, so people who are associated with Berkeley the university will get filtered out. I propose the syntax attribute:keyword
as a special syntax that is processed separately from the rest of the query. For example:
location:berkeley '24
Will find the intersection of the current results for '24
and the contacts with "berkeley" in the location field.
This can also apply multiple times. For example:
location:berkeley work:apple
finds everyone in the list who works at Apple, who lives in Berkeley.
The special field indicator all:
matches all fields. This is nice for disambiguation. For example, if we want to search for the string 'work:apple'
as a literal match rather than searching the "work" field, for example, we can type
all:work:apple
Which will match work:apple
on all fields.
My requirements on this have changed a bit, so I've implemented just the version of this that I will need to use Mira.
- Search scoped to one field
field: value1 value2 value3
We do not support the all:
syntax as colons generally don't appear in searched text. We also don't support multiple scoped keywords (intersection searches) as I don't think I need it. But if we do, we'll add it.