mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-07 14:02:48 +00:00
31 lines
735 B
TypeScript
31 lines
735 B
TypeScript
import {ElasticsearchConfigFile} from '../src/storage/elasticsearch/common';
|
|
|
|
/**
|
|
* A partial type which is recursive
|
|
*
|
|
* Copied and only modified array type from `[]` to `Array<>` from https://stackoverflow.com/a/51365037
|
|
*/
|
|
type RecursivePartial<T> = {
|
|
[P in keyof T]?:
|
|
T[P] extends Array<(infer U)> ? Array<RecursivePartial<U>> :
|
|
T[P] extends object ? RecursivePartial<T[P]> :
|
|
T[P];
|
|
};
|
|
|
|
/**
|
|
* This is the database configuration for the technical university of berlin
|
|
*/
|
|
const config: RecursivePartial<ElasticsearchConfigFile> = {
|
|
internal: {
|
|
database: {
|
|
name: 'elasticsearch',
|
|
query: {
|
|
minMatch: '60%',
|
|
queryType: 'query_string',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default config;
|