-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(DQL): ignore ordering of indexes in schema with eq function (DGRA…
…PH-2601) (#6996) Fixes DGRAPH-2601 Previously, the following schema: ``` name: string @index(trigram, term) . ``` with some added data, and the following query: ``` query { q(func: eq(name, "Alice", "Bob")) { uid name } } ``` would error out saying it doesn't have a valid tokenizer: ``` { "errors": [ { "message": ": Attribute name does not have a valid tokenizer.", "extensions": { "code": "ErrorInvalidRequest" } } ], "data": null } ``` even though `term` index is present on the predicate. On the other hand, if you reversed the order of indexes: ``` name: string @index(term, trigram) . ``` It would give correct results: ``` { "data": { "q": [ { "uid": "0x2", "name": "Alice", "age": 20 }, { "uid": "0x3", "name": "Bob", "age": 25 } ] } } ``` This PR fixes the above issue.
- Loading branch information
1 parent
e7eba98
commit 0b11439
Showing
3 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters