Hello.
I am using elasticsearch 5.4 and inject attachment plugin. I have indexed everything and search works fine.
But the question is: when i index a lot of content files and perform search with excluding attachment.content field - the time for search is too long (more than 300ms), but when the same index doesn't have content files (it is empty) the time is 30ms?
For example: Index has 200 documents with indexed attachments content - time per one query is 300-500ms. The same query in index with the same documents with empty attachment content takes 30ms. Why does it happen? I don't make any search in content file and exclude the content in response...
{
"from" : 0,
"size" : 20,
"_source" : {
"includes" : [
"order_id",
"title",
"customer_id"
],
"excludes" : [ attachment.* ]
},
"sort" : [
{
"order_id" : {
"order" : "asc"
}
}
],
"query": {
"bool" : {
"must" : [
{
"bool" : {
"must" : [
{
"bool" : {
"filter" : [
{
"match" : {
"order_id" : {
"query" : "1",
"operator" : "OR",
"prefix_length" : 0,
"max_expansions" : 50,
"fuzzy_transpositions" : true,
"lenient" : false,
"zero_terms_query" : "NONE",
"boost" : 1.0
}
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
],
"filter" : [
{
"term" : {
"customer_id" : {
"value" : "2",
"boost" : 1.0
}
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
}