0
0
bleve/search
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
..
collector simplify, per gofmt -s recommendation 2016-10-02 12:14:53 -04:00
facet actually rename packages to singular, not just directory name 2016-10-02 10:29:39 -04:00
highlight more golint fixes 2016-10-02 11:46:27 -04:00
query improve performance of regular expression and wildcard queries 2017-01-18 16:22:16 -05:00
scorer go fmt and go vet 2017-01-07 22:14:22 -08:00
searcher improve performance of regular expression and wildcard queries 2017-01-18 16:22:16 -05:00
collector.go nicer formatting of license header 2016-10-02 10:13:14 -04:00
explanation.go nicer formatting of license header 2016-10-02 10:13:14 -04:00
facets_builder_test.go numeric range facet merging compare range values not pointers 2016-11-03 15:48:46 -04:00
facets_builder.go numeric range facet merging compare range values not pointers 2016-11-03 15:48:46 -04:00
levenshtein_test.go removed extra ptr indirection from LevenshteinDistance 2016-10-11 08:49:10 -07:00
levenshtein.go removed extra ptr indirection from LevenshteinDistance 2016-10-11 08:49:10 -07:00
pool_test.go fix misspellings 2016-10-02 12:11:15 -04:00
pool.go fix misspellings 2016-10-02 12:11:15 -04:00
search.go API change: optional SearchRequest.IncludeLocations flag 2017-01-05 21:11:22 -08:00
sort.go fix misspellings 2016-10-02 12:11:15 -04:00
util_test.go nicer formatting of license header 2016-10-02 10:13:14 -04:00
util.go nicer formatting of license header 2016-10-02 10:13:14 -04:00