wuyunfeng commented on a change in pull request #2237: Optimize Doris On
Elasticsearch performance
URL: https://github.com/apache/incubator-doris/pull/2237#discussion_r352403569
##########
File path: be/src/exec/es/es_scroll_query.cpp
##########
@@ -75,15 +74,32 @@ std::string ESScrollQueryBuilder::build(const
std::map<std::string, std::string>
BooleanQueryBuilder::to_query(predicates, &scratch_document, &query_node);
// note: add `query` for this value....
es_query_dsl.AddMember("query", query_node, allocator);
- // just filter the selected fields for reducing the network cost
+ bool pure_docvalue = false;
+ // check docvalue sacan optimization
+ if (docvalue_context.size() > 0 && docvalue_context.size() >=
fields.size()) {
+ for (auto iter = fields.begin(); iter != fields.end(); iter++) {
+ if (!(docvalue_context.find(*iter) != docvalue_context.end())) {
+ pure_docvalue = false;
+ break;
+ }
+ pure_docvalue = true;
Review comment:
OK, the docvalue_context.size() > 0 would be check first.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]