https://github.com/macrat/indexedfts
Full-Text Search engine for web browser.
https://github.com/macrat/indexedfts
database full-text-search fulltext-search javascript-library
Last synced: 17 days ago
JSON representation
Full-Text Search engine for web browser.
- Host: GitHub
- URL: https://github.com/macrat/indexedfts
- Owner: macrat
- License: mit
- Archived: true
- Created: 2018-02-09T14:06:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-01-22T03:59:31.000Z (over 4 years ago)
- Last Synced: 2025-01-14T21:54:16.480Z (9 months ago)
- Topics: database, full-text-search, fulltext-search, javascript-library
- Language: JavaScript
- Homepage: https://macrat.github.io/IndexedFTS/
- Size: 2.52 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
IndexedFTS
==========Full-Text Search engine for web browser.
[](https://nodei.co/npm/indexedfts/)
[](https://travis-ci.org/macrat/IndexedFTS)
[](https://coveralls.io/github/macrat/IndexedFTS?branch=master)
[](https://github.com/macrat/IndexedFTS/blob/master/LICENSE)
[](https://macrat.github.io/IndexedFTS/)## install
### HTML
``` html```
### Node
``` shell
$ npm install indexedfts
```#### ES6
``` javascript
import IndexedFTS from 'indexedfts';
```#### common js
``` javascript
const IndexedFTS = require('indexedfts').IndexedFTS;
```## example
``` javascript
// make database
const db = IndexedFTS('database-name', 1, {
userid: 'primary', // primary key will indexed but can not full-text search
name: {unique: true, fulltext: true}, // unique index and can full-text search
description: 'fulltext', // full-text search
});db.open()
.then(() => {
db.put({
userid: 1,
name: 'hello',
description: 'this is test\n',
}, {
userid: 20,
name: 'world',
description: 'check check\nhello hello world!',
});
}).then(() => db.search(['name', 'description'], 'hel').lower('userid', 5))
.then(result => {
console.log(result.length); // output: 1
console.log(result[0].name); // output: hello
})
```