Skip to content

Commit

Permalink
Release 2.0.0-beta.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis CI User committed Jan 2, 2018
1 parent eba3285 commit ee614f6
Show file tree
Hide file tree
Showing 377 changed files with 11,817 additions and 10,227 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<a name="2.0.0-beta.5"></a>
# [2.0.0-beta.5](https://github.com/LokiJS-Forge/LokiJS2/compare/2.0.0-beta.4...2.0.0-beta.5) (2018-01-02)


### Bug Fixes

* **full-text-search-language:** add missing function export ([#64](https://github.com/LokiJS-Forge/LokiJS2/issues/64)) ([9b926e2](https://github.com/LokiJS-Forge/LokiJS2/commit/9b926e2))


### Features

* improve typings ([#62](https://github.com/LokiJS-Forge/LokiJS2/issues/62)) ([b44f550](https://github.com/LokiJS-Forge/LokiJS2/commit/b44f550))
* **full-text-search:** add an optional score explanation ([#65](https://github.com/LokiJS-Forge/LokiJS2/issues/65)) ([9fde195](https://github.com/LokiJS-Forge/LokiJS2/commit/9fde195))
* **memory-storage:** move memory storage to a separate package ([#63](https://github.com/LokiJS-Forge/LokiJS2/issues/63)) ([7cea02a](https://github.com/LokiJS-Forge/LokiJS2/commit/7cea02a))


<a name="2.0.0-beta.4"></a>
# [2.0.0-beta.4](https://github.com/LokiJS-Forge/LokiJS2/compare/2.0.0-beta.3...2.0.0-beta.4) (2017-12-01)

Expand Down
9 changes: 4 additions & 5 deletions dist/packages/fs-storage/lokijs.fs-storage.js

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

2 changes: 1 addition & 1 deletion dist/packages/fs-storage/lokijs.fs-storage.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/packages/fs-storage/lokijs.fs-storage.min.js

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

14 changes: 5 additions & 9 deletions dist/packages/fs-storage/types/common/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
export declare type ANY = any;
/**
* @hidden
*/
import { Loki } from "../loki/src";
export interface StorageAdapter {
loadDatabase(dbname: string): Promise<any>;
saveDatabase?(dbname: string, serialization: string): Promise<void>;
deleteDatabase?(dbname: string): Promise<void>;
mode?: string;
exportDatabase?(dbname: string, dbref: ANY): Promise<void>;
exportDatabase?(dbname: string, dbref: Loki): Promise<void>;
}
export declare type Doc<T extends object = object> = T & {
$loki: number;
Expand All @@ -14,10 +17,3 @@ export interface Dict<T> {
[index: string]: T;
[index: number]: T;
}
export interface Query {
}
export interface Filter<E> {
type: string;
val: Query | ((obj: E, index: number, array: E[]) => boolean);
uid: number | string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { StorageAdapter } from "../../common/types";
/**
* A loki persistence adapter which persists using node fs module.
*/
export declare class LokiFSStorage implements StorageAdapter {
export declare class FSStorage implements StorageAdapter {
/**
* Registers the fs storage as plugin.
*/
Expand Down Expand Up @@ -32,4 +32,3 @@ export declare class LokiFSStorage implements StorageAdapter {
*/
deleteDatabase(dbname: string): Promise<void>;
}
export default LokiFSStorage;
3 changes: 3 additions & 0 deletions dist/packages/fs-storage/types/fs-storage/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { FSStorage } from "./fs_storage";
export { FSStorage };
export default FSStorage;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { DE } from "./de";
export { DE };
export default DE;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { EN } from "./en";
export { EN };
export default EN;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { generateStopWordFilter, generateTrimmer, Among, SnowballProgram } from "./language";
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { InvertedIndex } from "./inverted_index";
import { Tokenizer } from "./tokenizer";
import { Dict } from "../../common/types";
import { Query } from "./query_builder";
import { ScoreResult } from "./scorer";
import { Scorer } from "./scorer";
export declare class FullTextSearch {
private _id;
private _docs;
Expand All @@ -21,14 +21,14 @@ export declare class FullTextSearch {
* @param {boolean=true} fields.optimizeChanges - flag to indicate if deleting/updating a document should be optimized
* (requires more memory but performs better)
* @param {Tokenizer=Tokenizer} fields.tokenizer - the tokenizer of the field
* @param {string=$loki} id - the property name of the document index
* @param {string} [id] - the property name of the document index
*/
constructor(fields?: FullTextSearch.FieldOptions[], id?: string);
addDocument(doc: object, id?: number): void;
removeDocument(doc: object, id?: number): void;
updateDocument(doc: object, id?: number): void;
clear(): void;
search(query: Query): ScoreResult;
search(query: Query): Scorer.ScoreResult;
toJSON(): FullTextSearch.Serialization;
static fromJSONObject(serialized: FullTextSearch.Serialization, tokenizers?: Dict<Tokenizer.FunctionSerialization>): FullTextSearch;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FullTextSearch } from "./full_text_search";
export { Tokenizer } from "./tokenizer";
export { QueryBuilder } from "./query_builder";
export { InvertedIndex } from "./inverted_index";
export { FullTextSearch };
import { Tokenizer } from "./tokenizer";
import { QueryBuilder } from "./query_builder";
export { FullTextSearch, Tokenizer, QueryBuilder };
export default FullTextSearch;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScoreResult } from "./scorer";
import { Scorer } from "./scorer";
import { InvertedIndex } from "./inverted_index";
import { Query } from "./query_builder";
import { Dict } from "../../common/types";
Expand All @@ -13,9 +13,9 @@ export declare class IndexSearcher {
* @param {object} invIdxs
*/
constructor(invIdxs: Dict<InvertedIndex>, docs: Set<number>);
search(query: Query): ScoreResult;
search(query: Query): Scorer.ScoreResult;
setDirty(): void;
private _recursive(query, doScoring);
private _getUnique(queries, doScoring, docResults);
private _getUnique(queries, doScoring, queryResults);
private _getAll(queries, doScoring);
}
Loading

0 comments on commit ee614f6

Please sign in to comment.