Internal
Static
Internal
optionsStatic
uiThe static uiExtensions
property is used to provide the necessary UI extensions to the Admin UI
in order to display the advanced search features.
This property is used in the AdminUiPlugin
initialization.
import { compileUiExtensions } from '@vendure/ui-devkit/compiler';
import { AdvancedSearchPlugin } from '@vendure-hub/vendure-advanced-search-plugin';
// ...
plugins: [
AdminUiPlugin.init({
route: 'admin',
port: 3002,
app: compileUiExtensions({
outputPath: path.join(__dirname, '../admin-ui'),
extensions: [AdvancedSearchPlugin.uiExtensions],
devMode: false,
})
}),
],
Static
uiThe static uiExtensionsNoAnalytics
property is used to provide the necessary UI extensions to the Admin UI
in order to display the advanced search features without analytics.
import { compileUiExtensions } from '@vendure/ui-devkit/compiler';
import { AdvancedSearchPlugin } from '@vendure-hub/vendure-advanced-search-plugin';
// ...
plugins: [
AdminUiPlugin.init({
route: 'admin',
port: 3002,
app: compileUiExtensions({
outputPath: path.join(__dirname, '../admin-ui'),
extensions: [AdvancedSearchPlugin.uiExtensionsNoAnalytics],
devMode: false,
})
}),
],
Static
initThe static init()
method is called with the options to configure the plugin.
AdvancedSearchPlugin.init({
shopApiKeySecret: process.env.SHOP_API_KEY_SECRET as string,
typeSenseClientOptions: {
apiKey: process.env.TYPESENSE_API_KEY as string,
nodes: [
{
host: process.env.TYPESENSE_HOST as string,
port: 8108,
protocol: 'http',
},
],
},
analytics: {
analyticsStrategy: new ClickhouseAnalyticsStrategy({
url: process.env.CLICKHOUSE_URL as string,
port: 8123,
database: 'vendure_search_analytics',
debug: false,
}),
},
customMappings: {
// same as ElasticSearchPlugin
},
}),
Advanced search and search analytics for Vendure.