[#205] New custom schema for redis index#258
Conversation
andre-senna
left a comment
There was a problem hiding this comment.
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_templatesoption:pattern_index_templatesoption -> Loads custom templates from DBpattern_index_templatesoption -> Loads from DB, if thepattern_index_templatesis different from loaded, ERRORpattern_index_templatesoption and fresh DB -> save defaultpattern_index_templatesCustom templates example (
pattern_index_templates):