0
0
Commit Graph

1249 Commits

Author SHA1 Message Date
Marty Schoch
8cd6040b63 Merge pull request #512 from steveyen/master
API change: optional SearchRequest.IncludeLocations flag
2017-01-09 14:19:17 -05:00
Marty Schoch
ae219d6397 Merge pull request #489 from Shugyousha/refactorphrasesearch
Refactor PhraseSearcher
2017-01-09 14:13:22 -05:00
Steve Yen
8f4726ab10 use struct{}{} idiom instead of additional mark var 2017-01-09 10:17:26 -08:00
Marty Schoch
d081ed712a Merge pull request #513 from mosuka/master
renamed detect_lang to detectlang
2017-01-09 09:17:57 -05:00
Minoru Osuka
63c0d9a4d2 renamed detect_lang to detectlang
renamed detect_lang to detectlang.
2017-01-09 16:51:48 +09:00
Steve Yen
302cac72c4 optimize mergeOldAndNew when non-update case 2017-01-08 17:59:49 -08:00
Steve Yen
931d133024 go fmt and go vet 2017-01-07 22:14:22 -08:00
Steve Yen
40780254ae optimize upsidedown mergeOldAndNew existing key maps
The optimization is to provide a better initial size to the map
constructor and to use a 0-byte-sized struct{} as the map values.
2017-01-07 22:05:55 -08:00
Steve Yen
c2bafa2a51 optimize term vectors/locations via preallocated arrays
The change should hit the allocator less often when processing term
vectors/locations as it preallocates larger, contiguous arrays of
records upfront.
2017-01-07 12:34:06 -08:00
Steve Yen
8b140d84c4 minor optimization of upsidedown backIndexRowForDoc
This change might allow a smart enough golang compiler to perhaps
allocate a backIndexRow on the stack rather than the heap.
2017-01-07 11:49:42 -08: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
Steve Yen
c21d27e15a upsidedown TermFieldReader checks includeTermVectors flag param
The flag was part of the API, but wasn't previously checked.
2017-01-05 21:10:27 -08:00
Marty Schoch
3b2bc30b54 fix type identification when object indexed is pointer to struct
fixes #508
2016-12-08 08:07:38 -05:00
Marty Schoch
d4f21a6290 Merge pull request #503 from steveyen/master
bleve/index/store/moss - accessor for underlying mossStore
2016-12-05 16:41:05 -05:00
Steve Yen
37490864ce bleve/index/store/moss - accessor for underlying mossStore
This change adds methods that provide access to the actual, underlying
mossStore instance in the bleve/index/store/moss KVStore adaptor.

This enables applications to utilize advanced, mossStore-specific
features (such as partial rollback of indexes).  See also
https://issues.couchbase.com/browse/MB-17805
2016-12-05 12:25:29 -08:00
Marty Schoch
c351931701 Merge branch 'slavikm-master4' 2016-11-28 15:00:48 -05:00
Marty Schoch
c927e124dd Merge branch 'master' of https://github.com/slavikm/bleve into slavikm-master4 2016-11-28 14:03:35 -05:00
slavikm
75c8c0e2b1 Revert the nil protection which is not needed 2016-11-23 09:26:07 -08:00
slavikm
20b847f04e Added protection again nil Boost 2016-11-22 13:04:36 -08:00
slavikm
a4c94e440e Added missing boost getters 2016-11-22 12:50:08 -08:00
Marty Schoch
58fe9b9562 Merge pull request #502 from pmezard/fix-docidreader-next-doc
index: DocIDReader.Next() returns nil when done not io.EOF
2016-11-20 13:16:35 -05:00
Patrick Mezard
c81fd6fdb0 index: DocIDReader.Next() returns nil when done not io.EOF 2016-11-20 19:05:35 +01:00
Marty Schoch
3da28dfbc1 Merge pull request #499 from mschoch/498
add support for parsing BoolFieldQuery from JSON
2016-11-16 11:50:44 -05:00
Marty Schoch
d372602f3c add support for parsing BoolFieldQuery from JSON
presence of the "bool" key triggers parsing as a BoolFieldQuery
fixes #498
2016-11-15 10:29:11 -05:00
slavikm
187d6013df Make sure getters follow the Go convention 2016-11-14 15:30:07 -08:00
slavikm
339ddbe0fa Added getters to boost and field query interfaces 2016-11-14 14:02:43 -08:00
Silvan Jegen
1a6a4c493b Check locations in the phrase searcher as well 2016-11-08 20:05:36 +01:00
Silvan Jegen
33e2432fc6 Initialize the return value as late as possible 2016-11-08 20:05:36 +01:00
Silvan Jegen
3dd363afaa Don't search the same term twice
We have searched for the first term in the phrase query already so we
can skip it. Before doing so we have to add the location of the first
term.
2016-11-08 20:05:04 +01:00
Silvan Jegen
d87b4f88bf Refactor phrase searching
Reduce nesting by using early continues.
2016-11-08 20:04:28 +01:00
Marty Schoch
bcaea084c5 Merge pull request #496 from mschoch/fix495
fix date facets when using MultiSearch
2016-11-04 15:06:57 -04:00
Marty Schoch
8e2159cbe4 Merge pull request #494 from steveyen/MB-21474
simplified MultiSearch requires that indexes honor context deadlines
2016-11-04 15:06:47 -04:00
Marty Schoch
647bfd10ad fix date facets when using MultiSearch
changed date parsing to NOT update internal state of the date
range object (avoids races)

second, when marshaling a facet date range, we now use the
string version, if the time.Time is zero and the string version
is not ""
2016-11-04 14:02:01 -04:00
Steve Yen
dc2b6cd656 simplified MultiSearch requires that indexes honor context deadlines
MultiSearch previously had its own timeout checking.  This commit
removes that timeout checking, so that now MultiSearch instead depends
upon the bleve.Index implementations to perform their own context
deadline/timeout checking.

Because deadline/timeout checking is now handled by the bleve.Index
implementations, this change allows applications to provide richer
error and status results during timeouts.
2016-11-03 16:44:20 -07:00
Marty Schoch
a3f8953c9f Merge pull request #493 from mschoch/fix492
numeric range facet merging compare range values not pointers
2016-11-03 16:28:04 -04:00
Marty Schoch
e5ec831250 numeric range facet merging compare range values not pointers
fix #492
2016-11-03 15:48:46 -04:00
Marty Schoch
81c76f2a4a Merge pull request #490 from steveyen/master
optimize NewRegexpSearcher to return its disjunction searcher
2016-10-31 10:39:50 -04:00
Steve Yen
adc409e823 optimize NewRegexpSearcher to return its disjunction searcher
This minor optimization removes an unnecessary wrapper around the
disjunction searcher.
2016-10-27 13:16:41 -07:00
Marty Schoch
1bd6451581 Merge pull request #487 from steveyen/optimize-facets-builder
Minor facets builder optimizations
2016-10-26 14:14:25 -04:00
Marty Schoch
f45584bf54 Merge pull request #486 from robmccoll/feature/overridejsontag
adding override for "json" in struct tags, tests
2016-10-26 14:11:22 -04:00
Steve Yen
2a8237e8cc optimize FacetsBuilder with cached fields & avoid some allocs 2016-10-25 15:34:48 -07:00
Steve Yen
a941a0f318 simplify DocumentFieldTerms append() usage 2016-10-25 15:30:19 -07:00
rob mccoll
43b5b36a19 adding override for "json" in struct tags, tests 2016-10-25 10:42:40 -04:00
Marty Schoch
ef28c7f9e0 Merge pull request #485 from mschoch/mousetrap
vendor mousetrap
2016-10-24 14:29:45 -04:00
Marty Schoch
1061636c9d vendor mousetrap
our policy has been to vendor the libraries required for the
command-line portion of the bleve command-line tool.  this
included spf13/cobra etc, unfortunately we missed this library
as it is only required for windows users.
2016-10-24 13:54:29 -04:00
Marty Schoch
bc0758b98a Merge pull request #483 from robmccoll/patch-2
Doc: JSONable config, KVStore <-> KVStoreConstructor
2016-10-24 12:15:34 -04:00
Marty Schoch
aaa686869c Merge pull request #484 from mschoch/blevecheck
add the bleve check tool
2016-10-22 19:41:25 -04:00
Marty Schoch
9174872ba2 add the bleve check tool
bleve check was a consistency checking tool originally developed
as a part of cbft.  currently it checks that the term dictionary
counts match the number of postings for the term.  in the future
additional checks could be added.  this tool has been back
ported to bleve as we've now adopted a single common tool for
both cbft and bleve.
2016-10-22 06:11:50 -04:00
Marty Schoch
09fc57c5db Merge pull request #482 from steveyen/MB-21377
revert optimization that trims search-disjunction child searchers
2016-10-22 05:50:55 -04:00
Rob McColl
12c404aec0 Update kvstore.go 2016-10-19 10:31:00 -04:00