-
Notifications
You must be signed in to change notification settings - Fork 1
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
[#205] New custom schema for redis index #258
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before merging this PR, I think we need an integration test case where we test which pattern keys are actually being generated IN THE REDIS TABLE given a custom index spec.
For instance if we use this spec:
[{
"field": "targets[0]",
"value": hasher.terminal_hash("Symbol", "Similarity")
"positions": [1,2]
"arity": 3
},
]
And add this expression:
(Similarity "Human" "Monkey")
I want to see the patterns actually added to the PATTERNS index in such a way that we can retrieve this expression if we make any of these queries:
(Similarity * "Monkey")
(Similarity "Human" *)
(Similarity * *)
Of course we want to vary the spec and the query format in several different cases.
Added more tests |
closes #205
QE constructor now accepts
pattern_index_templates
option:pattern_index_templates
option -> Loads custom templates from DBpattern_index_templates
option -> Loads from DB, if thepattern_index_templates
is different from loaded, ERRORpattern_index_templates
option and fresh DB -> save defaultpattern_index_templates
Custom templates example (
pattern_index_templates
):