Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jorishermans/texthill
A full text search engine using idf tf, that you can use in the browser and on the server.
https://github.com/jorishermans/texthill
Last synced: 10 days ago
JSON representation
A full text search engine using idf tf, that you can use in the browser and on the server.
- Host: GitHub
- URL: https://github.com/jorishermans/texthill
- Owner: jorishermans
- Created: 2020-10-07T18:17:58.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-22T19:28:04.000Z (over 3 years ago)
- Last Synced: 2024-04-28T14:22:24.071Z (8 months ago)
- Language: TypeScript
- Homepage:
- Size: 196 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
Awesome Lists containing this project
README
## TextHill
A search engine written in typescript, can be used in the browser, with node.js and deno.
Look at this example below to get you started.
```typescript
const th = new TextHill(new MemoryStore());
const feed = async () => {
await th.feedDoc("hello world", "some hello world for feeding");const results = await th.search("feeding");
}
```Or remove the document from the index.
```typescript
const th = new TextHill(new MemoryStore());
th.removeDoc("hello world").then(_ => console.log('succesfully removed'))
```### Packages
Texthill exists out of different packages that will help you to build and work with text search engines in the browser, dweb, server, ...
* @texthill/core is the core of texthill, this is all the basic classes that you need to get yourself started with texthill.
* @texthill/localstorage is the implementation of the store so that the indexes are been saved in the localstorage of the browser.
* @texthill/textile is the implementation of the store on top of textile ThreadsDB, getting an index of your collections (IPFS)