Hi community
I'm quite new to Elastic and have run into some obstacles.
I want to do a search on a specific company id, with filters, but can't it to work, although it works with query.
Why is that?
curl --location --request GET 'http://elastic1-test.server.com:9200/estransactionse*/_search?q=companyId:123&size=10&track_total_hits=true&pretty=true'
Works, get hits.
curl --location --request GET 'http://elastic1-test.server.com:9200/estransactionse*/_search?q=companyId:123&size=10&track_total_hits=true&pretty=true'
Works, get hits.
curl --location --request GET 'http://elastic1-test.server.com:9200/estransactionse*/_search?pretty' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": {
"bool": {
"filter": {
"term": { "companyId": "123" }
}
}
}
}'
Doesn't work.