diff options
Diffstat (limited to 'searchcore/src')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp | 2 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp index f81b47583b9..30ba7d320f7 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp @@ -627,7 +627,7 @@ AttributeWriter::internalPut(SerialNum serialNum, const Document &doc, DocumentI bool allAttributes, OnWriteDoneType onWriteDone) { for (const auto &wc : _writeContexts) { - if (wc.use_two_phase_put()) { + if (allAttributes && wc.use_two_phase_put()) { assert(wc.getFields().size() == 1); wc.consider_build_field_paths(doc); auto prepare_task = std::make_unique<PreparePutTask>(serialNum, lid, wc, doc); diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.cpp index 784ce649c5f..98c5daa1415 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.cpp @@ -102,9 +102,8 @@ do_limit(AttributeLimiter &limiter_factory, SearchIterator::UP search, double ma return search; } -// When hitrate is below 1% limiting the query is often far more expensive than not. -// TODO This limit should probably be a lot higher. -constexpr double MIN_HIT_RATE_LIMIT = 0.01; +// When hitrate is below 0.2% limiting the query is often far more expensive than not. +constexpr double MIN_HIT_RATE_LIMIT = 0.002; } // namespace proton::matching::<unnamed> |