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
string
default:
'http://localhost'
The host of the Elasticsearch server. May also be specified in clientOptions.node
.
port
property
number
default:
9200
The port of the Elasticsearch server. May also be specified in clientOptions.node
.
connectionAttempts
property
number
default:
10
Maximum amount of attempts made to connect to the ElasticSearch server on startup.
connectionAttemptInterval
property
number
default:
5000
Interval in milliseconds between attempts to connect to the ElasticSearch server on startup.
clientOptions
property
ClientOptions
Options 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
string
default:
'vendure-'
Prefix for the indices created by the plugin.