Skip to content

Significant text - Nested Object support #28050

@arkkanoid

Description

@arkkanoid

I'm trying the Significant Text feature on nested objects, but I get 0 items inside the buckets array.

  "hits": { 
    "total": 215,
    "max_score": 0,
    "hits": []
  },
  "aggregations": {
    "result": {
      "doc_count": 3025,
      "my_sample": {
        "doc_count": 3025,
        "keywords": {
          "doc_count": 3025,
          "bg_count": 9705720,
          "buckets": []
        }
      }
    }
  }

BUT, if I make a post as a no-nested object it works...

    "aggregations" : {
        "my_sample" : {
            "sampler" : {
                "shard_size" : 1000
            },
            "aggregations": {
                "keywords" : {
                    "significant_text" : { "field" : "data.jobs.description" }
                }
            }
        }
    }

The mapping is correct, if I try significant_terms with another term inside the nested object it works as I expected.

My mapping:

          "data": {
            "properties": {
              "jobs": {
                "type": "nested",
                "properties": {
                  "applicants": {
                    "type": "long"
                  },
                  "created_at": {
                    "type": "date"
                  },
                  "description": {
                    "type": "text"
                  },...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions