0
0
Commit Graph

10 Commits

Author SHA1 Message Date
Marty Schoch
f391b991c2 improve query string compatibility
1) disjunction and conjunction queries now support a
"query string mode".  By default they do not operate
in this mode.  When in this mode, any disjunct/conjunct
which evaluates to MatchNone searcher, will be removed
from the disjunction/conjunction.  If the query ends
up with NO conjuncts/disjuncts, it will itself
return the MatchNone seacher.

2) boolean query also supports a query string mode.  when in
this mode, the Must, Should and MustNot searchers are all put
into query string mode.

3) rewriting of negation only queries (like -foo) now take into
account the rewriting rules above, and those are handled first.
this means that we rewrite correctly in case of +stoword -foo

4) the empty query string is now valid, and returns 0 hits.
previously this was considered a validation error.
2017-02-23 13:04:18 -05:00
Steve Yen
89a1cefde1 API change: optional SearchRequest.IncludeLocations flag
This is a change in search result behavior in that location
information is no longer provided by default with search results.

Although this looks like a wide-ranging change, it's mostly a
mechanical replacement of the explain bool flag with a new
search.SearcherOptions struct, which holds both the Explain bool flag
and the IncludeTermVectors bool flag.
2017-01-05 21:11:22 -08:00
slavikm
75c8c0e2b1 Revert the nil protection which is not needed 2016-11-23 09:26:07 -08:00
slavikm
a4c94e440e Added missing boost getters 2016-11-22 12:50:08 -08:00
Marty Schoch
3a276153a3 actually rename packages to singular, not just directory name 2016-10-02 10:29:39 -04:00
Marty Schoch
2332455bd2 nicer formatting of license header 2016-10-02 10:13:14 -04:00
Marty Schoch
6bf9dd59ab BREAKING CHANGE - additional package renaming
i recently learned that package names should also prefer the
singular form, not the plural form
2016-10-01 17:20:59 -04:00
Steve Yen
a9cb8779c3 more careful Close()'ing and cleanup of searchers
From diagnosing a recent issue where the termSearchersFinished stats
were incorrectly tracked, I ended up scouring the Close() / cleanup
codepaths.

This change takes more care in Close()'ing child searchers, especially
in error situations.  This can be important to allow underlying
kvstore's to release resources.
2016-09-30 16:07:01 -07:00
Marty Schoch
b863add129 address code review comments from @steveyen 2016-09-29 14:54:17 -04:00
Marty Schoch
226efaebd8 remove query prefix from filenames, now in query package 2016-09-29 14:54:17 -04:00