I got this issue when invoke es search api in java client . When invoke search api in java by TransportClient under 500/1000/2000 concurrency press test , there are many threads waiting
Here is the whole stack dump :
and here is my code to search
SearchResponse response = esClient .prepareSearch(esManager.getIndexName()) .setTypes(esManager.getIndexType()) .setSearchType(SearchType.DFS_QUERY_THEN_FETCH) .setQuery(mmQuery).setPostFilter(andSearchFilter) .setTrackScores(true) .setMinScore(MyConst.SEARCH_ES_MINSCORE) .addSort(SortBuilders.scoreSort()) .addSort("official", SortOrder.DESC) .addSort("downloadCount", SortOrder.DESC) .setFrom(pageFrom).setSize(pageSize) .setExplain(true).execute().actionGet();
mmQuery is a MultiMatchQueryBuilder with two fileds , and andSearchFilter is a BoolQueryBuilder .
Any suggestion here ?