<commit_before>![](docs/tuq.png)

![](docs/tng.png)

## Running

### Users

    $ go get github.com/couchbaselabs/tuqtng
    $ tuqtnq -couchbase http://localhost:8091

### Developers

    $ mkdir -p $GOPATH/src/github.com/couchbaselabs
    $ cd $GOPATH/src/github.com/couchbaselabs
    $ git clone <EMAIL>:couchbaselabs/tuqtng.git
    $ cd tuqtng
    $ go get code.google.com/p/go.exp/locale/collate
    $ go get github.com/gorilla/mux
    $ go build
    $ ./tuqtng -couchbase http://localhost:8091

To run unit tests:

    $ go test ./...

## Querying via interactive command-line tool

    $ tuq_client
    tuq> SELECT * FROM beer-sample LIMIT 5

The --tuqtng parameter let's you specify the tuqtng server:

    $ tuq_client --tuqtng="http://localhost:8093/"

## Querying via HTTP

### HTTP Get

    curl 'http://localhost:8093/query?q=URL_ENCODED_QUERY_STRING'

### HTTP Post

    curl -HContent-Type:text/plain -XPOST http://localhost:8093/query -d 'QUERY_STRING'
<commit_msg>README notes on test json files.<commit_after>![](docs/tuq.png)

![](docs/tng.png)

## Running

### Users

    $ go get github.com/couchbaselabs/tuqtng
    $ tuqtnq -couchbase http://localhost:8091

### Developers

    $ mkdir -p $GOPATH/src/github.com/couchbaselabs
    $ cd $GOPATH/src/github.com/couchbaselabs
    $ git clone <EMAIL>:couchbaselabs/tuqtng.git
    $ cd tuqtng
    $ go get code.google.com/p/go.exp/locale/collate
    $ go get github.com/gorilla/mux
    $ go build
    $ ./tuqtng -couchbase http://localhost:8091

To run against the test json files as your "site":

    $ ./tuqtng -file=./test -pool=json

Then in your tuq_client:

    $ ./tuq_client/tuq_client
    tuq> select * from orders;

To run unit tests:

    $ go test ./...

## Querying via interactive command-line tool

    $ tuq_client
    tuq> SELECT * FROM beer-sample LIMIT 5

The --tuqtng parameter let's you specify the tuqtng server:

    $ tuq_client --tuqtng="http://localhost:8093/"

## Querying via HTTP

### HTTP Get

    curl 'http://localhost:8093/query?q=URL_ENCODED_QUERY_STRING'

### HTTP Post

    curl -HContent-Type:text/plain -XPOST http://localhost:8093/query -d 'QUERY_STRING'

{'fraction_non_alphanumeric': 0.1347846225104215, 'fraction_numerical': 0.019453450671607225, 'mean_word_length': 3.022346368715084, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2030785', 'n_tokens_mistral': 838, 'n_tokens_neox': 785, 'n_words': 179}