0.8.13 • Published 10 months ago

norch v0.8.13

Weekly downloads
101
License
MIT
Repository
github
Last release
10 months ago

NPM version NPM downloads MIT License Build Status Join the chat at https://gitter.im/fergiemcdowall/search-index

      ___           ___           ___           ___           ___      
     /\__\         /\  \         /\  \         /\  \         /\__\     
    /::|  |       /::\  \       /::\  \       /::\  \       /:/  /     
   /:|:|  |      /:/\:\  \     /:/\:\  \     /:/\:\  \     /:/__/      
  /:/|:|  |__   /:/  \:\  \   /::\~\:\  \   /:/  \:\  \   /::\  \ ___  
 /:/ |:| /\__\ /:/__/ \:\__\ /:/\:\ \:\__\ /:/__/ \:\__\ /:/\:\  /\__\ 
 \/__|:|/:/  / \:\  \ /:/  / \/_|::\/:/  / \:\  \  \/__/ \/__\:\/:/  / 
     |:/:/  /   \:\  /:/  /     |:|::/  /   \:\  \            \::/  /  
     |::/  /     \:\/:/  /      |:|\/__/     \:\  \           /:/  /   
     /:/  /       \::/  /       |:|  |        \:\__\         /:/  /    
     \/__/         \/__/         \|__|         \/__/         \/__/     

Deploy

npm install norch and then start with norch

or programatically:

require('norch')(options, function(err, norch) {
  // Norch server started on http://localhost:3030 (or the specified host/port)
})

Put stuff in

curl -X POST -d @myData.json http://localhost:3030/add (where myData.json is a newline separated file of JSON objects)

Search for hits (uses search-index's API)

http://localhost:3030/search?q={"query":[{"AND":{"*":["usa"]}}]}

(http://localhost:3030/search returns everything)

Make autosuggest

http://localhost:3030/matcher?q=usa

Export, import, and replicate an index

# create a snapshot on the server (available under /latestSnapshot)
curl -X POST http://localhost:3030/snapshot
# get latest snapshot
curl -X GET http://anotherIndex:3030/latestSnapshot > export.json
# replicate an export file into a new index on another server
curl -X POST -d @export.json http://someOtherServer:3030/import

API

EndpointMethodResponseTypical Use Case
/addPOSTstatus codeAdd documents to the index
/availableFieldsGETstreamDiscover the name of fields which can be searched in
/bucketsGETstreamAggregate documents on ranges of metadata
/categorizeGETstreamAggregate documents on single metadata values
/concurrentAddPOSTstatus codeFor when more than one source is adding documents to the index at the same time
/createSnapshotPOSTstatus codeCreate a snapshot of the index
/deleteDELETEstatus codeRemove documents from index
/docCountGETobjectCounts total document in index
/flushDELETEstatus codeRemove all documents from index
/getGETstreamGet documents by ID
/importPOSTfileImport/merge an existing index into this one
/latestSnapshotGETfileDownload the latest index snapshot
/listSnapshotsGETfileSee list of snapshots
/matchGETstreamMatch by linguistic similarity- autosuggest, autocomplete
/searchGETstreamSearch in the index
/totalHitsGETobjectShow number of hits that a given query returns

The Norch API docs are here. Norch is essentially an http wrapper around search-index.

About Norch

Norch.js is an experimental search engine built with Node.js and search-index featuring, Full text search, Stopword removal, aggregation Matching (Autosuggest), Phrase search, Fielded search, Field weighting, Relevance weighting (tf-idf), Paging (offset and resultset length)

Logging

On Linux and OSX. Install bunyan, tail the log-file and pipe to bunyan.

Install bunyan:

npm install -g bunyan

Tail log-file:

tail -f log-info.log |bunyan

Mailing list: norchjs@googlegroups.com - subscribe by sending an email to norchjs+subscribe@googlegroups.com

License

MIT, Copyright (c) 2013-16 Fergus McDowall

1.0.0

10 months ago

1.0.0-rc1

10 months ago

0.8.13

8 years ago

0.8.12

8 years ago

0.8.11

8 years ago

0.8.10

9 years ago

0.8.9

9 years ago

0.8.8

9 years ago

0.8.7

9 years ago

0.8.6

9 years ago

0.8.5

9 years ago

0.8.4

9 years ago

0.8.3

9 years ago

0.8.2

9 years ago

0.8.1

9 years ago

0.8.0

9 years ago

0.7.1

9 years ago

0.7.0

9 years ago

0.6.16

9 years ago

0.6.15

9 years ago

0.6.14

9 years ago

0.6.13

9 years ago

0.6.12

9 years ago

0.6.11

9 years ago

0.6.10

10 years ago

0.6.9

10 years ago

0.6.8

10 years ago

0.6.7

10 years ago

0.6.5

10 years ago

0.6.4

10 years ago

0.6.3

10 years ago

0.6.2

10 years ago

0.6.1

10 years ago

0.6.0

10 years ago

0.5.0

10 years ago

0.4.17

10 years ago

0.4.16

10 years ago

0.4.15

10 years ago

0.4.14

10 years ago

0.4.13

10 years ago

0.4.12

11 years ago

0.4.11

11 years ago

0.4.10

11 years ago

0.4.9

11 years ago

0.4.8

11 years ago

0.4.7

11 years ago

0.4.6

11 years ago

0.4.5

11 years ago

0.4.4

11 years ago

0.4.3

11 years ago

0.4.2

11 years ago

0.4.0

11 years ago

0.3.9

11 years ago

0.3.7

11 years ago