Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"agg_type": "term" - query is not returning the bucket result for string type #929

Open
joshuascjohn opened this issue Nov 2, 2023 · 1 comment

Comments

@joshuascjohn
Copy link

Executed agg. query as in the document https://zincsearch-docs.zinc.dev/api/search/aggregation/#request

Default Olympics data set is been used for my testing

Below is the bucket List response - on changing the field from string to number -example - 'Year' bucket list started to returning the values correctly. I suspect it broken for String type

Used latest version [v0.4.9]

        "Medal": {
            "buckets": [
                {
                    "doc_count": 3051,
                    "key": 0,
                    "key_as_string": ""
                }
            ]
        },
@JackSeven
Copy link

Check your field index settings, so you can configure whether it supports aggregatable,like this
"Brand": { "type": "text", "index": true, "store": false, "sortable": false, "aggregatable": false, "highlightable": false, "fields": { "keyword": { "type": "keyword", "index": false, "store": false, "sortable": false, "aggregatable": true, "highlightable": false } } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants