ElasticsearchOptions
ElasticsearchOptions
Configuration options for the ElasticsearchPlugin.
Signature
interface ElasticsearchOptions {
host?: string;
port?: number;
connectionAttempts?: number;
connectionAttemptInterval?: number;
clientOptions?: ClientOptions;
indexPrefix?: string;
indexSettings?: object;
indexMappingProperties?: {
[indexName: string]: object;
};
reindexProductsChunkSize?: number;
reindexBulkOperationSizeLimit?: number;
searchConfig?: SearchConfig;
customProductMappings?: {
[fieldName: string]: CustomMapping<[Product, ProductVariant[], LanguageCode, Injector, RequestContext]>;
};
customProductVariantMappings?: {
[fieldName: string]: CustomMapping<[ProductVariant, LanguageCode, Injector, RequestContext]>;
};
bufferUpdates?: boolean;
hydrateProductRelations?: Array<EntityRelationPaths<Product>>;
hydrateProductVariantRelations?: Array<EntityRelationPaths<ProductVariant>>;
extendSearchInputType?: {
[name: string]: PrimitiveTypeVariations<GraphQlPrimitive>;
};
extendSearchSortType?: string[];
}
host
property
stringdefault:
'http://localhost'The host of the Elasticsearch server. May also be specified in clientOptions.node.
port
property
numberdefault:
9200The port of the Elasticsearch server. May also be specified in clientOptions.node.
connectionAttempts
property
numberdefault:
10Maximum amount of attempts made to connect to the ElasticSearch server on startup.
connectionAttemptInterval
property
numberdefault:
5000Interval in milliseconds between attempts to connect to the ElasticSearch server on startup.
clientOptions
property
ClientOptionsOptions to pass directly to the
Elasticsearch Node.js client. For example, to
set authentication or other more advanced options.
Note that if the node or nodes option is specified, it will override the values provided in the host and port options.
indexPrefix
property
stringdefault:
'vendure-'Prefix for the indices created by the plugin.