Skip to content

Fluent API Documentation missing #8341

@bmontalvoDD

Description

@bmontalvoDD

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions