Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/00-matt/node-fist

Node.js client library for Fist full text search
https://github.com/00-matt/node-fist

fist node-js

Last synced: 29 days ago
JSON representation

Node.js client library for Fist full text search

Awesome Lists containing this project

README

        

# node-fist
> Node.js client library for [Fist](https://github.com/f-prime/fist) full text search

### Installation

```
npm install node-fist
```

### Support and Requirements

Only the LTS and Current Node.js versions are supported.
Other versions may work, but are not actively tested.

### Usage

##### Connecting

```js
const { FistConnection } = require('node-fist')

const index = new FistConnection('localhost', 5575)
```

##### Indexing

```js
index.index('doc_1', 'the quick brown fox jumped over the lazy dog')
```

##### Searching

```js
index.search('lazy dog', (err, documents) => {
if (err) return console.error(err)
console.log(documents) // => ['doc_1']
})
```

##### Disconnecting

```js
index.close()
```

### License

Released under the terms of the MIT license.
See [LICENSE](LICENSE) for more details.