Method HasRoot
HasRoot(SearchDefinition<TDocument>, SearchScoreDefinition<TDocument>)
Creates a search definition that moves the context back up the tree of embedded documents to the root such that root fields can be used in searches of embedded documents.
public SearchDefinition<TDocument> HasRoot(SearchDefinition<TDocument> @operator, SearchScoreDefinition<TDocument> score = null)
Parameters
operatorSearchDefinition<TDocument>The operator to execute at the root.
scoreSearchScoreDefinition<TDocument>The score modifier.
Returns
- SearchDefinition<TDocument>
A search definition for the root.