Skip to content

Instantly share code, notes, and snippets.

@steveyen
steveyen / gist:b912499ec2b59daf58a6
Created March 23, 2015 16:14
couchbaselabs/couchdb-harness/script/test/lorem_b64.txt
get couchbaselabs/couchdb-harness/script/test/lorem_b64.txt
VALUE couchbaselabs/couchdb-harness/script/test/lorem_b64.txt 1 56451
{"type":"github/text","repo":"couchbaselabs/couchdb-harness","project":"couchdb-harness","key":"couchbaselabs/couchdb-harness/script/test/lorem_b64.txt","url":"https://github.com/couchbaselabs/couchdb-harness/blob/master/script/test/lorem_b64.txt","ext":".txt","title":"script/test/lorem_b64.txt","contents":"TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4gUGhhc2VsbHVzIG51bmMgc2FwaWVuLCBwb3J0YSBpZCBwZWxsZW50ZXNxdWUgYXQsIGVsZW1lbnR1bSBldCBmZWxpcy4gQ3VyYWJpdHVyIGNvbmRpbWVudHVtIGFudGUgaW4gbWV0dXMgaWFjdWxpcyBxdWlzIGNvbmd1ZSBkaWFtIGNvbW1vZG8uIERvbmVjIGVsZWlmZW5kIGFudGUgc2VkIG51bGxhIGRhcGlidXMgY29udmFsbGlzLiBVdCBjdXJzdXMgYWxpcXVhbSBuZXF1ZSwgdmVsIHBvcnR0aXRvciB0ZWxsdXMgaW50ZXJkdW0gdXQuIFNlZCBwaGFyZXRyYSBsYWNpbmlhIGFkaXBpc2NpbmcuIEluIHRyaXN0aXF1ZSB0cmlzdGlxdWUgZmVsaXMgbm9uIHRpbmNpZHVudC4gTnVsbGEgYXVjdG9yIG1hdXJpcyBhIHZlbGl0IGN1cnN1cyB1bHRyaWNpZXMuIEluIGF0IGxpYmVyb
$ ./cbft -h
cbft: couchbase full-text server
Usage: cbft [flags]
Flags:
-bindAddr ADDR:PORT
optional HTTP/REST listen addr:port;
default is 'localhost:8095'.
-c, -cfg, -cfgConnect CFG_CONNECT
@steveyen
steveyen / blog.md
Last active August 29, 2015 14:22 — forked from mschoch/blog.md

Announcing CBFT Developer Preview!

Today we're excited to announce a developer preview release of CBFT, which offers full-text indexing for Couchbase Server. CBFT will allow Couchbase users to more easily add full-text search capabilities to their application without having to deploy additional infrastrucutre dedicated to search.

The CBFT developer preview offers:

  • analysis and indexing powered by Bleve, a full-text library written in Go
  • advanced index mapping to customize behavior to your documents
  • faceted search
  • incremental indexing using Couchbase DCP technology
@steveyen
steveyen / diff
Last active August 29, 2015 14:24
cbft spawned by ns-server
Steves-MacBook-Pro:couchbase-server steveyen$ repo diff
project ns_server/
diff --git a/cbcollect_info b/cbcollect_info
index 8d3e393..9ed5c96 100755
--- a/cbcollect_info
+++ b/cbcollect_info
@@ -294,7 +294,8 @@ def basedir():
def make_os_tasks():
programs = " ".join(["moxi", "memcached", "beam.smp",
"nodeDefsWanted": {
"uuid": "5be9fb30295f5377",
"nodeDefs": {
"7673bdfa51cba5b4": {
"hostPort": "127.0.0.1:9200",
"uuid": "7673bdfa51cba5b4",
"implVersion": "4.0.0",
"tags": null,
"container": "",
"weight": 1,
pool := make(chan thing, size)
func Get() {
t, ok := <-pool
if !ok { return PoolClosed }
return t
}
func Return(t) {
m.lock()
/debug/pprof/goroutine?debug=2: "
goroutine636 [running]: runtime/pprof.writeGoroutineStacks(0x7f3db038a500, 0xc83aae8d90, 0x0, 0x0) /usr/local/go/src/runtime/pprof/pprof.go:516 +0x84 runtime/pprof.writeGoroutine(0x7f3db038a500, 0xc83aae8d90, 0x2, 0x0, 0x0) /usr/local/go/src/runtime/pprof/pprof.go:505 +0x46 runtime/pprof.(*Profile).WriteTo(0x12ef640, 0x7f3db038a500, 0xc83aae8d90, 0x2, 0x0, 0x0) /usr/local/go/src/runtime/pprof/pprof.go:236 +0xd4 github.com/couchbase/cbgt/rest.DiagGetPProf(0x7f3db560fa00, 0xc8200c56b0, 0xcfbef0, 0x9, 0x2) /home/couchbase/serverjenkins/workspace/watson-unix/goproj/src/github.com/couchbase/cbgt/rest/rest_diag.go:160 +0xb1 github.com/couchbase/cbgt/rest.(*DiagGetHandler).ServeHTTP.func2(0x7f3db560fa00, 0xc8200c56b0, 0xc8200127e0) /home/couchbase/serverjenkins/workspace/watson-unix/goproj/src/github.com/couchbase/cbgt/rest/rest_diag.go:70 +0x49 net/http.HandlerFunc.ServeHTTP(0xe62498, 0x7f3db560fa00, 0xc8200c56b0, 0xc8200127e0) /usr/local/go/src/net/http/server.go:1422 +0x3a git
Steves-MacBook-Pro:bleve steveyen$ go test ./...
ok github.com/blevesearch/bleve 0.290s
ok github.com/blevesearch/bleve/analysis 0.011s
? github.com/blevesearch/bleve/analysis/analyzers/custom_analyzer [no test files]
? github.com/blevesearch/bleve/analysis/analyzers/keyword_analyzer [no test files]
? github.com/blevesearch/bleve/analysis/analyzers/simple_analyzer [no test files]
? github.com/blevesearch/bleve/analysis/analyzers/standard_analyzer [no test files]
? github.com/blevesearch/bleve/analysis/analyzers/web [no test files]
? github.com/blevesearch/bleve/analysis/byte_array_converters/ignore [no test files]
? github.com/blevesearch/bleve/analysis/byte_array_converters/json [no test files]
@steveyen
steveyen / bleve version
Created January 5, 2016 22:05
bleve rocksdb-firestorm locked during bleve-blast
Steves-MBP:bleve steveyen$ git log | head
commit 83cd8da39445fa989a1a3b1f7b7de739bad8fcfe
Merge: e5c1af4 89d17f0
Author: Marty Schoch <[email protected]>
Date: Tue Jan 5 16:04:59 2016 -0500
Merge pull request #307 from steveyen/WIP-perf-20160105
analyze locations only if includeTermVectors enabled
@steveyen
steveyen / gist:4bea9743685da358a560
Last active January 10, 2016 23:42
firestorm garbage collector fixes

Proposal for firestorm garbage collector (FGC) fixes...

Example data...

A simple example is a user ("user7") document changing his location field from "CA" to "VA". The KVStore will then have TermFreqRow records that would look like...

't'/1/CA/user7/10
't'/1/WA/user7/11

Above, 1 is a fieldId for the location field. "user7" is the docId. 10 and 11 are docNumbers.