-
Notifications
You must be signed in to change notification settings - Fork 586
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
NIP-50 search filter should work with multiple values #772
base: master
Are you sure you want to change the base?
Conversation
…h AND condition in the same way `kinds` and `authors` are used
The NIP-50 search extension feels like an after thought. This is a mess: So @viktorvsk I guess it should be |
why would we limit searches to non-space strings? Are there any disadvantages to using an array? |
I think they got inspired by githubs |
So there is no way to filter |
Search engines have all kinds of quirks that can be supported using just free text queries, I think we're fine relying on |
I personally have always found structured text queries to be extremely annoying because they are subject either to user-defined input (resulting in syntax errors or unexpected results) or complicated escaping. Structured data and user input should never be mixed. But maybe I'm wrong since that's contrary to established convention in full text search. |
I want to implement some essential yet simple filters which are a must imo in order to access data efficiently. In my opinion they (most of them) should better be a part of NIP-1 but in order to not make it too complex I think of implementing them in context of NIP-50 Some examples are:
And I don't see any sense to implement them as a single string because I see a lot of problems and zero profit. So I have 3 options:
For now I tend use a slightly customized nip50 at least until I see an argument in favor of |
All conditions in a search are ANDed.
You would also need to separate extensions like I don't think there will be an easy spec |
Yeah I'm talking exactly about AND filters. If say I want to find "all root notes of my friends which have text like something like 'I love nostr and bitcoin'" |
In order to use
search
filter in the same way askinds
andauthors
it needs to accept array of strings. Those values will be used as AND conditions so that we could say that{"kind": 1, "search": ["without_tag:e", "followers_of:<pubkey>"]}
we want to find root notes of our followers for instance.