Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@texthill/textile

jorishermans8ISC0.3.0TypeScript support: included

A store implementation to store the indexes for texthill in Textile ThreadsDB (IPFS)

search engine, full-text, nlp, textile, ipfs

readme

TextHill / Textile integration

A search engine that makes the documents in textile threads db searchable.

Using textile repository as a helper to work with the search model.

Look at this example below to get you started.

import { SearchModel, TextileStore } from '@texthill/textile';

const repo = new Repository<SearchModel>(searchCollectionName, db, threadId);
const th = new TextHill(new TextileStore(repo));
const feed = async () => {
    await th.feedDoc(model._id, model);

    const results = await th.search("feeding"); 
}

Or remove the document from the index.

const repo = new Repository<SearchModel>(searchCollectionName, db, threadId);
const th = new TextHill(new TextileStore(repo));
th.removeDoc(model._id).then(_ => console.log('succesfully removed'))