• Home
  • History
  • Annotate
  • only in this directory
Name Date Size

..11-Jan-20224 KiB

adminport/H11-Jan-20224 KiB

bin/H11-Jan-20224 KiB

build.shH A D11-Jan-20221.5 KiB

cmd/H11-Jan-20224 KiB

collatejson/H11-Jan-20224 KiB

common/H11-Jan-20224 KiB

dataport/H11-Jan-20224 KiB

dcp/H11-Jan-20224 KiB

docs/H11-Jan-20224 KiB

fdb/H11-Jan-20224 KiB

indexer/H11-Jan-20224 KiB

logging/H11-Jan-20224 KiB

manager/H11-Jan-20224 KiB

memdb/H11-Jan-20224 KiB

natsort/H11-Jan-20224 KiB

pipeline/H11-Jan-20224 KiB

planner/H11-Jan-20224 KiB

platform/H11-Jan-20224 KiB

projector/H11-Jan-20224 KiB

protobuf/H11-Jan-20224 KiB

querycmd/H11-Jan-20224 KiB

queryport/H11-Jan-20224 KiB

README.mdH A D11-Jan-20222.1 KiB

stats/H11-Jan-20224 KiB

stubs/H11-Jan-20224 KiB

system/H11-Jan-20224 KiB

tests/H11-Jan-20224 KiB

TODO.rstH A D11-Jan-2022457

tools/H11-Jan-20224 KiB

transport/H11-Jan-20224 KiB

README.md

1Secondary Index Repository
2==========================
3
4All production secondary index related components (code, design, documentation) live here.
5
6###Setup and Build Instructions
7
8    $ mkdir -p $GOPATH/src/github.com/couchbase
9    $ cd $GOPATH/src/github.com/couchbase
10    $ git clone git@github.com:couchbase/indexing.git
11    $ cd indexing/secondary
12    $ go get -d -v ./...
13    $ ./build.sh
14
15Note:
16Following dependencies need to be installed beforehand:
17- Protobuf: https://code.google.com/p/protobuf/
18- ForestDB: https://github.com/couchbaselabs/forestdb
19
20If build is successful, indexing/secondary/bin will have the binaries for projector and indexer.
21
22####Starting Projector
23
24Projector can be started with below command line options:
25
26    bin > ./projector
27    Usage : ./projector [OPTIONS] <cluster-addr> 
28      -adminport="localhost:9999": adminport address
29      -loglevel=debug: choose logging level
30      -kvaddrs="127.0.0.1:12000": comma separated list of kvaddrs
31      
32E.g. projector can be started in trace mode against Couchbase server running with 
33cluster_run mode with the command:
34
35    ./projector -trace localhost:9000
36    
37
38Projector has a sample test program which can be run using:
39
40    go run tools/datapath.go
41
42####Starting Indexer
43
44Projector can be started with below command line options:
45
46    bin > ./indexer -h
47    Usage of ./indexer:
48      -loglevel=info|debug|trace
49      -projector="http://localhost:9999": Projector Admin Port Address
50      -vbuckets=1024: Number of vbuckets configured in Couchbase
51    
52    
53E,g. indexer can be started for 8 vbuckets and log level of Info with the below command:
54
55    ./indexer -vbuckets 8 -log 1
56    
57Currently the only entry point for Indexer is tuqtng command line shell. 
58Follow the instructions for setting up the tuqtng project:
59
60https://github.com/couchbaselabs/tuqtng#developers
61
62Instead of the master branch, index-preview branch needs to be built. 
63Rest of the instructions remain the same. 
64
65And on the cbq shell, creating an index of type "forestdb" will allocate a new index
66in the Indexer:
67
68    cbq> create index idx1 on default(field1) using forestdb;
69    
70
71
72
73
74
75