new module:models/NestedQuery(path, query)
Constructs a new NestedQuery
.
A nested query queries nested documents that are part of a larger document. The classical example is a product master with variants (in one big document) where you want to constrain a search to masters that have variants that match multiple constraints (like color = blue AND size = M). This query is not compatible with some search types.
Parameters:
Name | Type | Description |
---|---|---|
path |
String | |
query |
module:models/Query |
- Source:
Members
(readonly) ScoreModeEnum :String
Allowed values for the score_mode
property.
Type:
- String
- Source:
(inner, constant) avg
value: "avg"
- Source:
(inner, constant) max
value: "max"
- Source:
(inner, constant) none
value: "none"
- Source:
(inner) path :String
Type:
- String
- Source:
(inner) query :module:models/Query
Type:
- Source:
(inner) score_mode :module:models/NestedQuery.ScoreModeEnum
Type:
- module:models/NestedQuery.ScoreModeEnum
- Source:
(inner, constant) total
value: "total"
- Source:
Methods
(static) constructFromObject(data, obj) → {module:models/NestedQuery}
Constructs a NestedQuery
from a plain JavaScript object, optionally creating a new instance.
Copies all relevant properties from data
to obj
if supplied or a new instance if not.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The plain JavaScript object bearing properties of interest. |
obj |
module:models/NestedQuery | Optional instance to populate. |
- Source:
Returns:
The populated NestedQuery
instance.