Bidzina Goginashvili

Bidzina Goginashvili

  • NA
  • 206
  • 26.2k

My ElastiSearch query in .net is fetching data too slow.help

Jul 29 2019 3:41 AM
I don't know why response needs too much time to query data.
 
var response = _client.Search<ModelName>(s => s
.Index("products")
.From(0)
.Size(10)
.Query(q => q
.MultiMatch(m => m
.Fields(fields => fields
.Field(
p => p.ManufacturerPartNumber
)
.Field(
p => p.Name,5
)
.Field(
p => p.FullDescription
)
.Field(
p => p.ShortDescription
)
.Field(
p => p.Sku
))
.Query(term)
.Type(TextQueryType.BestFields))));
var productIds = (from hits in response.Hits
select hits.Source.Id).ToArray();
var models = _productModelFactory.PrepareElasticProductOverviewModels(productIds, false, true, _mediaSettings.AutoCompleteSearchThumbPictureSize).ToList();
in kibana in took it writes 264
GET /products/_search
{
"query": { "match_all": {}},
"size":10000
}
 
pls any suggestions? 

Answers (1)