@texthill/textile
    TypeScript icon, indicating that this package has built-in type declarations

    0.3.0 • Public • Published

    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'))

    Install

    npm i @texthill/textile

    DownloadsWeekly Downloads

    0

    Version

    0.3.0

    License

    ISC

    Unpacked Size

    82.3 kB

    Total Files

    66

    Last publish

    Collaborators

    • jorishermans