-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #271 [Elasticsearch] pass custom field options even if no con…
…dition is set (jkabat) This PR was merged into the 2.0-dev branch. Discussion ---------- | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #270 | License | MIT | Doc PR | As I don't know elasticasearch internals good enough I'm not sure about other possible use cases besides "inner_hits". This option has to be set for nested/joined field conditionally (when field is really used in the query) and I can only solve it dirty way after generating of query... I was thinking that we actually need to distinguish field options from conditions options and proper method signature could be: ```php public function registerField(string $fieldName, string $property, array $conditions = [], array $conditionOptions = [], array $options = []) { } ``` prepareProcessedValuesQuery/prepareQuery updated accordingly. This also brings even more complexity to the code, so other way round could be to leave it solely on developer and use only one "options" argument for all cases but later it could bite us. @dkarlovi WDYT? Commits ------- b5e3fa6 pass field/condition options in all prepareQuery statements e68696c remove possible typo when options are set for field without conditions aa20f13 test adding custom options for registered field with no conditions set
- Loading branch information
Showing
3 changed files
with
50 additions
and
7 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