-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
When specifying a preference on the query descriptor, it causes elasticsearch to throw an exception.
It seems that the preference is added to the body part of the query instead of the search parameters.
ElasticSeacrh code to re-produce
var result = elasticClient.Search<OrganizationProfile>(
op=>op.Query(
q=>q.Term(
t=>t.Profile.PersonalDetail.FirstName,"juan"
)
)
.ExecuteOnPrimary()
.Fields(field => field.Profile)
.From(0)
.Size(2)
);
Fiddler output (sent to ES):
{
"from": 0,
"size": 2,
"query": {
"term": {
"Profile.PersonalDetail.FirstName": {
"value": "juan"
}
}
},
"fields": [
"Profile"
],
"preference": "_primary"
}
Exception:
Parse Failure [No parser for element [preference]]]; }]
Metadata
Metadata
Assignees
Labels
No labels