When searching I use match, term, aggs and sometimes wildcard
Query phrases I use:
Match Match
term
Aggs
wildcard
script
There are simple queries and there are large and relatively complex queries
Approx. Document size up to 1 MB
Yes, the queries will return the documents and also the aggregations
Yes true but it depends on the need of the user
For example, the query returns from 20 thousand to 40 thousand This is in the normal form, but if the user wants to return more data, he only scrolls or specifies certain conditions for the data he wants, such as from a date to another specific date, or he filters the data according to a specific field in the project The flexibility is high for the user to display his data in the appropriate way for him, so he must be quick to return the results
The queries I use vary from one query to another, including term, match, aggs, and also sometimes using wildcard and script
The queries will vary, some of them are somewhat simple, and there are some that are large
The default in the interfaces shows 20,000 documents, but it is expected that the user will query up to 100,000 and may reach twice this number in cases of review
I don't know exactly how much, but there are many details, so we will need a lot of queries relatively
This is an example of a query.
GET emdix_name/_search
{
"aggs": {
"duplicate_values": {
"composite": {
"sources": [
{ "field_name": { "terms": { "field": "field_name" } } },
{ "field_name": { "terms": { "field": "field_name" } } },
{ "field_name": { "terms": { "field": "field_name" } } },
{ "field_name": { "terms": { "field": "field_name" } } }
],
"size": 100
},
"aggs": {
"duplicate_count": {
"value_count": {
"field": "field_name"
}
},
"duplicate_script": {
"bucket_script": {
"buckets_path": {
"count": "duplicate_count"
},
"script": "params.count >= 1 ? 1 : 0"
}
}
}
}
},
"collapse": {
"field": "field_name"
},
"query": {
"bool": {
"must": [
{
"term": {
"field_name": ""
}
},
{
"term": {
"field_name": ""
}
},
{
"term": {
"field_name": ""
}
},
{
"term": {
"field_name": ""
}
}
]
}
},
"track_total_hits": true
}
This is only an inquiry that took:
And this is another query
GET /index_name/_search
{
"size": 10,
"aggs": {
"unique_combinations": {
"composite": {
"sources": [
{"field1": {"terms": {"field": "field_name"}}},
{"field2": {"terms": {"field": "field_name"}}},
{"field3": {"terms": {"field": "field_name"}}}
]
}
}
}
}
This is only an inquiry that took: 21677