1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-22 05:33:16 +02:00

update readme

This commit is contained in:
Thomas Wilkerling
2021-05-21 07:24:53 +02:00
parent c7b2fe52ba
commit ac532fb6e7

View File

@@ -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