summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-04-27 13:23:02 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-04-27 13:23:02 +0000
commit5651e88489043f9d1ae44cb3014d41aaa30f427e (patch)
tree276237706042f6b141cf95a57167038102ac64e4 /searchlib
parentc72ba4246cb35505f585714b5cba823992efb9ae (diff)
Reorder to handle both cased and uncased regex and prefix.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
index 3b21686a5bb..ceb8926bbe3 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
+++ b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
@@ -293,12 +293,12 @@ StringPostingSearchContext(QueryTermSimpleUP qTerm, bool useBitVector, const Att
template <typename BaseSC, typename AttrT, typename DataT>
bool
StringPostingSearchContext<BaseSC, AttrT, DataT>::useThis(const PostingListSearchContext::DictionaryConstIterator & it) const {
- if ( this->isCased() ) {
- return this->isMatch(_enumStore.get_value(it.getKey()));
- } else if ( this->isRegex() ) {
+ if ( this->isRegex() ) {
return this->getRegex().valid()
? this->getRegex().partial_match(_enumStore.get_value(it.getKey()))
: false;
+ } else if ( this->isCased() ) {
+ return this->isMatch(_enumStore.get_value(it.getKey()));
}
return true;
}