-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: optional token separators for search index schema (#382)
- Loading branch information
1 parent
a527ec4
commit aa6ffc2
Showing
9 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,5 +61,8 @@ | |
} | ||
} | ||
} | ||
}, | ||
"options": { | ||
"token_separators": ["/"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import { SearchIndexOptions } from "../../types"; | ||
|
||
/**@internal*/ | ||
export interface SearchIndexMetadata { | ||
readonly indexName: string; | ||
readonly target: Function; | ||
readonly options: SearchIndexOptions; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
import { getDecoratorMetaStorage } from "../globals"; | ||
import { SearchIndexOptions } from "../types"; | ||
|
||
/** | ||
* TigrisSearchIndex decorator is used to mark a class as a schema/data model for Search Index. | ||
* | ||
* @param name - Name of Index | ||
* @param options - Search index options | ||
*/ | ||
export function TigrisSearchIndex(name: string): ClassDecorator { | ||
export function TigrisSearchIndex(name: string, options?: SearchIndexOptions): ClassDecorator { | ||
return function (target) { | ||
getDecoratorMetaStorage().indexes.push({ | ||
indexName: name, | ||
target: target, | ||
options: options, | ||
}); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters