b55c9043b9
While researching an observed performance issue with wildcard queries, it was observed that the LiteralPrefix() method on the regexp.Regexp struct did not always behave as expected. In particular, when the pattern starts with ^, AND involves some backtracking, the LiteralPrefix() seems to always be the empty string. The side-effect of this is that we rely on having a helpful prefix, to reduce the number of terms in the term dictionary that need to be visited. This change now makes the searcher enforce start/end on the term directly, by using FindStringIndex() instead of Match(). Next, we also modified WildcardQuery and RegexpQuery to no longer include the ^ and $ modifiers. Documentation was also udpated to instruct users that they should not include the ^ and $ modifiers in their patterns. |
||
---|---|---|
.. | ||
bool_field.go | ||
boolean.go | ||
boost.go | ||
conjunction.go | ||
date_range_test.go | ||
date_range.go | ||
disjunction.go | ||
docid.go | ||
fuzzy.go | ||
match_all.go | ||
match_none.go | ||
match_phrase.go | ||
match.go | ||
numeric_range.go | ||
phrase.go | ||
prefix.go | ||
query_string_lex.go | ||
query_string_parser_test.go | ||
query_string_parser.go | ||
query_string.go | ||
query_string.y | ||
query_string.y.go | ||
query_test.go | ||
query.go | ||
regexp.go | ||
term.go | ||
wildcard.go |