Hi All,

     we had created the index of 130 million data with 5 shards and four 
nodes.we had written the query with query string passing around 100 search 
values with space separate and passing the results to another query.total 
it is taking around 5 to 6 secs to complete get the results for two 
queres.Is there any performance improvent suggestion.Below is the query i 
am running


qb =  
QueryBuilders.queryString(QotConstants.SERIAL_NUMBER+"("+serialNumbers+")");
 
   SearchResponse response = 
elasticClient.prepareSearch("index").setQuery(qb)
   
.setSearchType(SearchType.QUERY_THEN_FETCH).addField(QotConstants.INSTANCE_ID).setFrom(0)
   .setSize(20000)
   .execute()
          .actionGet();
  results = response.getHits().hits();
  String  instanceQueryString = ""; 
  int i=0;
for (SearchHit hit : results) {
instanceQueryString =instanceQueryString+" 
"+hit.getFields().get(QotConstants.INSTANCE_ID).getValue();


  }
  List<Map<String,Object>> hits = new ArrayList<Map<String,Object>>();
if(!instanceQueryString.equals("")){
  response = elasticClient.prepareSearch("index")
  
 
.setQuery(QueryBuilders.queryString("PARENT_INSTANCE_ID:("+instanceQueryString.trim()+")"))
   .setSearchType(SearchType.QUERY_THEN_FETCH)
     .setFrom(0).setSize(200)
          .execute()
          .actionGet();

  results = response.getHits().hits();
  for (SearchHit hit : results) {
hits.add(hit.getSource());  
}
}


Thanks for you help in advance

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/1ad89fe6-f4ad-429f-9fa8-45b6607b93ac%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to