Skip to content

Commit

Permalink
v0.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ts-thomas committed Feb 3, 2019
1 parent a43db89 commit 83bf721
Show file tree
Hide file tree
Showing 9 changed files with 256 additions and 121 deletions.
58 changes: 56 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,10 @@ index.search({

When suggestion is enabled all results will be filled up (until limit, default 1000) with similar matches ordered by relevance.

Actually phonetic suggestions are not supported, for that purpose use the encoder and tokenizer which provides similar functionality. Suggestions comes into game when a query has multiple words/phrases. Assume a query contains 3 words. When the index just match 2 of 3 words then normally you will get no results, but with suggestion enabled you will also get results when 2 of 3 words was matched as well 1 of 3 words was matched (depends on the limit), also sorted by relevance.

<a name="index.update"></a>
#### Update item of an index
#### Update item from an index

> Index.__update(id, string)__
Expand All @@ -699,7 +701,7 @@ index.update(10025, "Road Runner");
```

<a name="index.remove"></a>
#### Remove item to the index
#### Remove item from an index

> Index.__remove(id)__
Expand Down Expand Up @@ -923,6 +925,49 @@ It is also possible to <a href="#builds">compile language packs into the build</
node compile SUPPORT_LANG_EN=true SUPPORT_LANG_DE=true
```

<a name="rtl"></a>
### Right-To-Left Support

> Set the tokenizer at least to "reverse" or "full" when using RTL.
Just set the field "rtl" to _true_ and use a compatible tokenizer:

```js
var index = FlexSearch.create({
encode: "icase",
tokenize: "reverse",
rtl: true
});
```

<a name="cjk"></a>
### CJK Word Break (Chinese, Japanese, Korean)

Set a custom tokenizer which fits your needs, e.g.:

```js
var index = FlexSearch.create({
encode: false,
tokenize: function(str){
return str.split(/[\x00-\x7F]+/);
}
});
```

You can also pass a custom encoder function to apply some linguistic transformations.

```js
index.add(0, "서울시가 잠이 든 시간에 아무 말, 미뤄, 미뤄");
```

```js
var results = index.search("");
```

```js
var results = index.search("시간에");
```

<a name="index.info"></a>
### Get info about an index

Expand Down Expand Up @@ -1182,6 +1227,15 @@ FlexSearch ist highly customizable. Make use of the the <a href="#profiles">righ
</td>
<td>Disable or pass in language shorthand flag (ISO-3166) or a custom array.</td>
</tr>
<tr></tr>
<tr>
<td align="top">rtl<br><br><br></td>
<td>
true<br>
false
</td>
<td>Enables Right-To-Left encoding.</td>
</tr>
</table>

<a name="tokenizer"></a>
Expand Down
34 changes: 17 additions & 17 deletions dist/flexsearch.compact.js

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions dist/flexsearch.es5.js

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions dist/flexsearch.light.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 83bf721

Please sign in to comment.