Skip to content

Commit

Permalink
v0.5.31 Improve Logical Operators, Fix: nextapps-de#44, nextapps-de#45,
Browse files Browse the repository at this point in the history
  • Loading branch information
ts-thomas committed Feb 16, 2019
1 parent 89125f6 commit 4cf4d94
Show file tree
Hide file tree
Showing 15 changed files with 614 additions and 284 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#### v0.5.1

- Provide customizable scoring resolution
- Customizable Scoring Resolution

#### v0.5.0

Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ var index = new FlexSearch({
});
```

> __Hint:__ This is an alternative for indexing documents which are much more complex: https://github.com/nextapps-de/flexsearch/issues/36
> __Hint:__ This is an alternative for indexing documents which has nested arrays: <a href="https://github.com/nextapps-de/flexsearch/issues/36">https://github.com/nextapps-de/flexsearch/issues/36</a>
#### Add/Update/Remove Documents to/from the Index

Expand Down Expand Up @@ -1288,7 +1288,7 @@ var results = index.search({
Could also be written as:

```js
var results = index.search("title", {
var results = index.search("foobar", {
field: ["title", "body"],
bool: "or"
});
Expand All @@ -1299,12 +1299,10 @@ Search different queries on multiple fields:
```js
var results = index.search([{
field: "title",
query: "foo",
bool: "and"
query: "foo"
},{
field: "body",
query: "bar",
bool: "and"
query: "bar"
}]);
```

Expand Down Expand Up @@ -1505,6 +1503,13 @@ var results = index.search("John", {
});
```

> The default sorting order is from lowest to highest.
Explicitly set sorting direction (from highest to lowest):
```js
sort: ">data:title"
```

Sort by a custom function:
```js
var results = index.search("John", {
Expand Down Expand Up @@ -2280,7 +2285,6 @@ var results = search("movie title", {

Split indexes by categories improves performance significantly.


##### Use numeric IDs

It is recommended to use numeric id values as reference when adding content to the index. The byte length of passed ids influences the memory consumption significantly. If this is not possible you should consider to use a index table and map the ids with indexes, this becomes important especially when using contextual indexes on a large amount of content.
Expand Down Expand Up @@ -2434,6 +2438,8 @@ Custom Build:
npm run build-custom SUPPORT_WORKER=true SUPPORT_ASYNC=true
```

> On custom builds each build flag will be set to _false_ by default.
Alternatively you can also use:
```bash
node compile SUPPORT_WORKER=true
Expand Down Expand Up @@ -2523,7 +2529,7 @@ node compile SUPPORT_WORKER=true

## Contribution

I would be glad about any kind of help. Feel free to contribute to this project and also feel free to contact me (https://github.com/ts-thomas) when you have any questions. There are just one simple (and maybe unusual) coding convention: all public accessible identifiers should be singular.
Feel free to contribute to this project and also feel free to contact me (<a href="https://github.com/ts-thomas">https://github.com/ts-thomas</a>) when you have any questions.

<a href="CHANGELOG.md">Changelog</a>

Expand Down
2 changes: 1 addition & 1 deletion compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ if(release === "lang"){
}
else{

exec("java -jar node_modules/google-closure-compiler-java/compiler.jar" + parameter + "' --js='flexsearch.js' --js='lang/**.js' --js='!lang/**.min.js'" + flag_str + " --js_output_file='dist/flexsearch." + (options["RELEASE"] || "custom") + ".js' && exit 0", function(){
exec("java -jar node_modules/google-closure-compiler-java/compiler.jar" + parameter + " --js='flexsearch.js' --js='lang/**.js' --js='!lang/**.min.js'" + flag_str + " --js_output_file='dist/flexsearch." + (options["RELEASE"] || "custom") + ".js' && exit 0", function(){

var filename = "flexsearch." + (options["RELEASE"] || "custom") + ".js";

Expand Down
46 changes: 23 additions & 23 deletions dist/flexsearch.compact.js

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions dist/flexsearch.es5.js

Large diffs are not rendered by default.

25 changes: 12 additions & 13 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 4cf4d94

Please sign in to comment.