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:
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
|
### Basic Usage
|
||||||
|
|
||||||
Load the library via the ES6 module system:
|
#### ES6 Modules:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import Index from "./index.js";
|
import Index from "./index.js";
|
||||||
import Document from "./document.js";
|
import Document from "./document.js";
|
||||||
|
|
||||||
var index = new Index(options);
|
const index = new Index(options);
|
||||||
var document = new Document(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:
|
Or load one of the builds from the folder `dist` to your html as a script and use as follows:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@@ -38,6 +40,20 @@ var index = new FlexSearch.Index(options);
|
|||||||
var document = new FlexSearch.Document(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:
|
The method signature stays almost unchanged:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
Reference in New Issue
Block a user