0
0
Commit Graph

614 Commits

Author SHA1 Message Date
Ben Campbell
0e9230178f tweak queryparser 'go generate' lines (portablity)
sed is used to massage the .go files output from nex and yacc.
However, the -i (in-place) option works slightly differently
between gnu (eg Linux) and bsd (eg OSX) sed.
This change should make it work on both flavours.
2015-10-19 11:41:17 +13:00
Marty Schoch
c9471d5739 Merge pull request #244 from kevgs/master
reducing allocation count
2015-10-16 15:51:30 -04:00
Marty Schoch
390781b379 Merge branch 'Shugyousha-simplebleveindex' 2015-10-16 13:11:51 -04:00
Marty Schoch
9528e09b1c rearrange code to avoid global variable rv
also check possible error returned by filepath.Walk
2015-10-16 13:10:43 -04:00
Marty Schoch
5c26f96606 Merge branch 'simplebleveindex' of https://github.com/Shugyousha/bleve into Shugyousha-simplebleveindex 2015-10-16 13:09:05 -04:00
Marty Schoch
e6d0fc8d95 Merge pull request #247 from pmezard/remove-update-goroutine
upside_down: no need for a goroutine to enqueue AnalysisWork
2015-10-16 10:15:55 -04:00
Marty Schoch
52f0112b0f allow bleve_dump to proces files wrapped in metrics kv store 2015-10-14 12:46:55 -07:00
Silvan Jegen
0ef988a318 Use filepath.Walk instead of rolling our own func 2015-10-14 16:44:00 +02:00
Marty Schoch
08572e4925 move literals outside loop for more predicatble test results 2015-10-12 18:06:38 -07:00
Marty Schoch
f43fa4294a simplify prefix coding
based on discussion here:
https://github.com/blevesearch/blevesearch.github.io-hugo/pull/2
2015-10-12 14:53:17 -07:00
Patrick Mezard
8c928539ee upside_down: no need for a goroutine to enqueue AnalysisWork
It boils down to:
1. client sends some work and a notification channel to a single worker,
   then waits.
2. worker processes the work
3. worker sends the result to the client using the notification channel

I do not see any problem with this, even with unbuffered channels.
2015-10-12 10:42:14 +02:00
Marty Schoch
9b16fa6528 Merge pull request #245 from pmezard/minor-doc-and-code-changes
Minor doc and code changes
2015-10-09 09:27:13 -04:00
Patrick Mezard
e2fa3d6351 doc: document Token, TokenFrequencies and Field structs
It helps understanding what is going on in indexing code.
ArrayPositions() was particularly puzzling.
2015-10-09 12:32:44 +02:00
Patrick Mezard
aee82f8b49 upside_down: simplify return code in batchRows() 2015-10-09 09:57:12 +02:00
Kosov Eugene
a61c350888 reducing allocation count 2015-10-05 22:57:10 +03:00
Marty Schoch
c0335e9fe4 Merge pull request #243 from pmezard/document-fields-retrieval
doc: document field values storage and retrieval
2015-10-05 10:52:23 -04:00
Patrick Mezard
ee8af9cfa3 doc: document field values storage and retrieval 2015-10-04 11:25:58 +02:00
Marty Schoch
e3a185b1c5 Merge pull request #242 from pmezard/add-boltdb-nosync-option
boltdb: add "nosync" option to force boltdb.DB.NoSync=true
2015-10-03 09:50:55 -04:00
Patrick Mezard
9d5407be13 boltdb: add "nosync" option to force boltdb.DB.NoSync=true
Use this option when rebuilding indexes from scratch. In my small case
(~17000 json documents), it reduces indexing from 520s to 250s.

I did not add any test, short of forced indexing termination it only
has performance effects, which are hard to test. And unknown options are
currently ignored.

Issue #240
2015-10-03 14:26:48 +02:00
Marty Schoch
6a9e2252c4 Merge pull request #241 from pmezard/document-field-analyzer-a-bit
Document field analyzer a bit
2015-10-02 13:12:56 -04:00
Patrick Mezard
2f48c16c84 doc: document IndexMapping.AddCustomAnalyzer 2015-10-02 17:38:07 +02:00
Patrick Mezard
ed1bdbf599 doc: document field analyzer resolution 2015-10-02 17:00:45 +02:00
Patrick Mezard
498e4a0de7 simplify FieldMapping.analyzerForField()
I stumbled onto that while trying to understand how analyzers are
resolved. The new code looks simpler to me and removes useless calls to
DocumentMapping.defaultAnalyzerName() when an analyzer is set at
FieldMapping level.

The slight change to TestStoredFieldPreserved avoids a stacktrace when
the test fails.
2015-10-02 15:45:43 +02:00
Marty Schoch
21473509b2 Merge branch 'Shugyousha-codesimplification' 2015-09-29 13:03:08 -04:00
Marty Schoch
da40935e22 Merge branch 'codesimplification' of https://github.com/Shugyousha/bleve into Shugyousha-codesimplification 2015-09-29 13:02:56 -04:00
Marty Schoch
09bde6ca87 Merge pull request #237 from pmezard/document-mapping-rules
doc: document indexed value/mappings interactions
2015-09-29 12:51:46 -04:00
Marty Schoch
1aac60a0f1 stop building wiki (retired) example project 2015-09-29 12:47:47 -04:00
Marty Schoch
6fa02b786d Merge pull request #236 from pmezard/implement-doc-static-mapping
implement document static mappings
2015-09-29 12:38:50 -04:00
Patrick Mezard
7db27aeba1 implement document static mappings
DocumentMapping.Dynamic was ignored by everything but the marshalling
code.

Issue #235
2015-09-29 11:32:36 +02:00
Marty Schoch
c3a4fab911 Merge pull request #238 from ikawaha/ja-morph-analyzer
fix compliation with the latest changes to kagome
2015-09-28 17:05:46 -04:00
Marty Schoch
cddf90c0ee don't allow operations on empty doc id
fixes #239
2015-09-28 17:00:08 -04:00
ikawaha
89af7978a9 fix compliation with the latest changes to kagome 2015-09-28 15:53:08 +09:00
Marty Schoch
1c9feaf792 fix backwards compatibility when index meta does not specify
the index type
2015-09-25 09:57:09 -07:00
Patrick Mezard
f72172a902 doc: document indexed value/mappings interactions
This is not the final word on this but it would have helped me a lot
starting with bleve. I left out details about value processing and
custom parsers. I also ignored that named FieldMapping can directly
resolve value fields without having a parent SubDocumentMapping because
it did not appear in any example I read.

Let's consider this as a starting point for documentation improvements.
2015-09-23 19:57:38 +02:00
Silvan Jegen
650d48427d Refactor AddFieldValue method
Removing one level of nesting makes the method easier to read.
2015-09-21 21:14:15 +02:00
Silvan Jegen
3414701fca Simplify returns 2015-09-21 20:47:10 +02:00
Silvan Jegen
f95a4662b1 Use Error type correctly 2015-09-21 20:47:10 +02:00
Steve Yen
ad82b4b33e updated link to simple query syntax in README.md 2015-09-17 10:27:58 -07:00
Marty Schoch
5897997906 update utils for new bleve config 2015-09-16 17:18:46 -04:00
Marty Schoch
f81b2be334 major refactor of bleve configuration
see #221 for full details
2015-09-16 17:10:59 -04:00
Marty Schoch
17c64d37c7 add similar benchmarks from firestorm 2015-09-10 08:13:52 -04:00
Marty Schoch
d00bc91dc9 minor speed up in token frequency calculations
benchmark               old ns/op     new ns/op     delta
BenchmarkAnalysis-4     1599218       1540991       -3.64%

benchmark               old allocs     new allocs     delta
BenchmarkAnalysis-4     5353           5318           -0.65%

benchmark               old bytes     new bytes     delta
BenchmarkAnalysis-4     370495        362983        -2.03%
2015-09-04 18:57:39 -04:00
Marty Schoch
0fab4b4583 fix nested document mappings, logic was broken
part of #228
2015-09-02 19:07:41 -04:00
Marty Schoch
dbb93b75a4 refactoring to allow pluggable index encodings
this lays the foundation for supporting the new firestorm
indexing scheme.  i'm merging these changes ahead of
the rest of the firestorm branch so i can continue
to make changes to the analysis pipeline in parallel
2015-09-02 13:12:08 -04:00
Marty Schoch
4840aaaa5a make analysis queue size changeable 2015-09-02 11:55:30 -04:00
Marty Schoch
7ad7659ce5 add support for using null kvstore outside of bleve internals 2015-09-02 11:50:06 -04:00
Marty Schoch
07d37ca38a add important rocksdb config options 2015-09-02 11:49:42 -04:00
Marty Schoch
3e60ca24ec support using end key on forestdb iterator for term freq lookup
also additoanl forestdb configs
2015-08-18 16:22:02 -04:00
Marty Schoch
d3dda3d0ea fixup config parsing and add new options 2015-08-12 13:18:23 -04:00
Marty Schoch
01667dfff3 faster protobufs with gogo 2015-08-12 13:18:23 -04:00