Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1830] datastore_search accepts multiple filters values as array
With this patch, if you query the datastore_search with filters: ```json { "filters": { "country": ["Brazil", "Argentina"] } } ``` It'll return the rows that have `country IN ("Brazil", "Argentina")`. I had to change the `datastore_search` extension point on `IDatastore` because I needed the fields' types. I needed the fields' types because the Datastore accept fields with array type (e.g. `_text`). When filtering a field that has an array type, I want to query literally. In the sample query above, the Datastore can create two different queries, depending on the type of the `country` field. If it's not an array type, it'll do as I described above, querying `country IN ("Brazil", "Argentina")`. If it's of an array type, it'll query literally `country = ["Brazil", "Argentina"]`.
- Loading branch information
1 parent
fc29b6e
commit d3761f8
Showing
4 changed files
with
32 additions
and
15 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
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