Utility of the "DOT" matcher % for `matching? #115
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
orinoco/dump-things-server#115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now, the matching is done against the JSON string form of an entire record. All use cases I can think of would want to match against values of a key, never a key directly. Any JSON record would not have a predictable order also.
Is there any use case that does NOT require wrapping any search string in
%to get any sensible hits?If the feature is later extended to only match against values, would the
matchingterm be matched against the start and end of individual values? Or a concatenation of values?If the latter, the question above stands also then.
If the former, what would be the syntax to limit the matching to a particular (subset of) keys?
The value-based match is implemented in the open PR #123
Hard to say. It might be interesting to find all records with a certain prefix.
PR #123 implements matching against individual values.
A possible syntax (PR #123 does not implement key subsets and does not define a syntax) would be
<key>=<value>. Another way to specify key-specific searches would be to post a search-spec to the endpoint. The search-spec could be a JSON dictionary with<key>: <pattern>entries.One issue would be the
<key>-spec. Because records have a tree structure, we need a path-syntax for keys. That is not a problem, but the performance impacts of such an approach are not yet determined.