Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support fine-grained search syntax #1

Closed
thesephist opened this issue Jul 30, 2020 · 1 comment
Closed

Support fine-grained search syntax #1

thesephist opened this issue Jul 30, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@thesephist
Copy link
Owner

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.

@thesephist thesephist added the enhancement New feature or request label Jul 30, 2020
@thesephist thesephist self-assigned this Jul 30, 2020
@abdelhai abdelhai mentioned this issue Oct 1, 2020
@thesephist
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant