0
0
bleve/search/query
Marty Schoch b55c9043b9 improve performance of regular expression and wildcard queries
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.
2017-01-18 16:22:16 -05:00
..
bool_field.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
boolean.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
boost.go nicer formatting of license header 2016-10-02 10:13:14 -04:00
conjunction.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
date_range_test.go fix BleveQueryTime json marshaling with double-quoting 2016-10-12 11:39:08 -07:00
date_range.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
disjunction.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
docid.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
fuzzy.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
match_all.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
match_none.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
match_phrase.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
match.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
numeric_range.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
phrase.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
prefix.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
query_string_lex.go fix misspellings 2016-10-02 12:11:15 -04:00
query_string_parser_test.go nicer formatting of license header 2016-10-02 10:13:14 -04:00
query_string_parser.go nicer formatting of license header 2016-10-02 10:13:14 -04:00
query_string.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
query_string.y don't export unnecessary method 2016-10-02 11:50:58 -04:00
query_string.y.go don't export unnecessary method 2016-10-02 11:50:58 -04:00
query_test.go add support for parsing BoolFieldQuery from JSON 2016-11-15 10:29:11 -05:00
query.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
regexp.go improve performance of regular expression and wildcard queries 2017-01-18 16:22:16 -05:00
term.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
wildcard.go improve performance of regular expression and wildcard queries 2017-01-18 16:22:16 -05:00