-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Using Elastic.Clients.Elasticsearch 8.14 for .NET, I cannot for the life of me figure out how to make a query using the Highlight fluent API. Is there any documentation other than the simplistic query shown on Searching for documents? I can get the results I need using the Query DSL shown below:
"query": {
"wildcard": {
"description": "cat*"
}
},
"highlight": {
"fields": {
"description": {
"type": "plain",
"fragment_size": 0,
"number_of_fragments": 0,
"highlight_query": {
"wildcard": {
"description": "cat*"
}
},
"boundary_scanner": "chars",
"boundary_max_scan": 20,
"fragmenter": "simple",
"pre_tags": ["<em>"],
"post_tags": ["</em>"],
"require_field_match": true
}
}
}
}
Any help would be greatly appreciated, even the GPTs are stumped as to how to use the Fluent API. I wish I could put the raw JSON in a request but that appears to not be working since I'm getting this error
Reason: "unknown query [raw_json]" CausedBy: "Type: named_object_not_found_exception Reason: "[2:17] unknown field [raw_json]""
Metadata
Metadata
Assignees
Labels
No labels