Skip to content

Commit

Permalink
v0.6.24 Separate Exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ts-thomas committed Jul 23, 2019
1 parent 9586437 commit 97cc0d9
Show file tree
Hide file tree
Showing 12 changed files with 708 additions and 546 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2560,6 +2560,48 @@ feeds_2018.import(localStorage.getItem("feeds_2018"));
feeds_2019.import(localStorage.getItem("feeds_2019"));
```

#### Disable Serialization

Pass a config flag to control serialization:

```js
var data = index.export({serialize: false});
```

Use the same config accordingly when importing data:

```js
index.import(data, {serialize: false});
```

#### Separate Exports (Documents)

Pass a config flag to separate index and documents from the export:

```js
var idx = index.export({index: true, doc: false});
```

```js
var docs = index.export({index: false, doc: true});
```

Use the same config accordingly when importing data:

```js
index.import(idx, {index: true, doc: false});
```

```js
index.import(docs, {index: false, doc: true});
```

You can also pass documents as external data, assume `data` is an array of documents:

```js
index.import(idx, {index: true, doc: data});
```

<a name="debug"></a>
## Debug

Expand Down
7 changes: 5 additions & 2 deletions compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ var parameter = (function(opt){

compilation_level: compilation_level || "ADVANCED_OPTIMIZATIONS", //"WHITESPACE"
use_types_for_optimization: true,
new_type_inf: true,
//new_type_inf: true,
jscomp_warning: "newCheckTypes",
jscomp_error: "newCheckTypesExtraChecks",
//jscomp_error: "strictCheckTypes",
generate_exports: true,
export_local_property_definitions: true,
Expand All @@ -94,7 +95,9 @@ var parameter = (function(opt){
emit_use_strict: options["RELEASE"] !== "lang",
output_manifest: "log/manifest.log",
output_module_dependencies: "log/module_dependencies.log",
property_renaming_report: "log/renaming_report.log"
property_renaming_report: "log/renaming_report.log",
strict_mode_input: true,
assume_function_wrapper: true
//formatting: formatting || "DEFAULT" //"PRETTY_PRINT"
});

Expand Down
3 changes: 2 additions & 1 deletion demo/autocomplete.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@

encode: "advanced",
tokenize: "reverse",
suggest: true
suggest: true,
cache: true
});

for(var i = 0; i < data.length; i++){
Expand Down
44 changes: 22 additions & 22 deletions dist/flexsearch.compact.js

Large diffs are not rendered by default.

87 changes: 44 additions & 43 deletions dist/flexsearch.es5.js

Large diffs are not rendered by default.

27 changes: 14 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 97cc0d9

Please sign in to comment.