mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-08-22 21:53:21 +02:00
update readme
This commit is contained in:
22
doc/0.7.0.md
22
doc/0.7.0.md
@@ -21,16 +21,18 @@ You can use an instance of Index directly (very much like the old FlexSearch whe
|
||||
|
||||
### Basic Usage
|
||||
|
||||
Load the library via the ES6 module system:
|
||||
#### ES6 Modules:
|
||||
|
||||
```js
|
||||
import Index from "./index.js";
|
||||
import Document from "./document.js";
|
||||
|
||||
var index = new Index(options);
|
||||
var document = new Document(options);
|
||||
const index = new Index(options);
|
||||
const document = new Document(options);
|
||||
```
|
||||
|
||||
#### Browser Bundle (ES5 Support):
|
||||
|
||||
Or load one of the builds from the folder `dist` to your html as a script and use as follows:
|
||||
|
||||
```js
|
||||
@@ -38,6 +40,20 @@ var index = new FlexSearch.Index(options);
|
||||
var document = new FlexSearch.Document(options);
|
||||
```
|
||||
|
||||
#### Node.js:
|
||||
|
||||
Install the non-published beta version:
|
||||
|
||||
```cmd
|
||||
npm install https://github.com/nextapps-de/flexsearch/tarball/0.7.0
|
||||
```
|
||||
|
||||
Use as a npm module:
|
||||
|
||||
```js
|
||||
const { Index, Document } = require("flexsearch");
|
||||
```
|
||||
|
||||
The method signature stays almost unchanged:
|
||||
|
||||
```js
|
||||
|
Reference in New Issue
Block a user