tools: elasticsearch prepare analyzer
This commit is contained in:
parent
ef961feddd
commit
8452d959c9
1 changed files with 38 additions and 10 deletions
|
|
@ -27,21 +27,49 @@ esClient.ingest.putPipeline({
|
|||
},
|
||||
});
|
||||
|
||||
esClient.indices.putMapping({
|
||||
esClient.indices.create({
|
||||
index: DEFAULT_INDEX,
|
||||
body: {
|
||||
settings: {
|
||||
index: {
|
||||
analysis: {
|
||||
analyzer: {
|
||||
analyzer_shingle: {
|
||||
type: "custom",
|
||||
tokenizer: "icu_tokenizer",
|
||||
filter: ["filter_shingle"],
|
||||
},
|
||||
},
|
||||
filter: {
|
||||
filter_shingle: {
|
||||
type: "shingle",
|
||||
max_shingle_size: 3,
|
||||
min_shingle_size: 2,
|
||||
output_unigrams: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
mappings: {
|
||||
properties: {
|
||||
pathname: {
|
||||
type: "keyword",
|
||||
},
|
||||
path: {
|
||||
type: "keyword",
|
||||
},
|
||||
path: { type: "keyword" },
|
||||
pathname: { type: "keyword" },
|
||||
|
||||
fileName: { type: "text", analyzer: "analyzer_shingle" },
|
||||
title: { type: "text", analyzer: "analyzer_shingle" },
|
||||
description: { type: "text", analyzer: "analyzer_shingle" },
|
||||
|
||||
"attachment.content": { type: "text", analyzer: "analyzer_shingle" },
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
minioClient.makeBucket(DEFAULT_BUCKET!, (e) => {
|
||||
if (!e) console.log("Success. Configuration is needed for Bucket Notification to AMQP.");
|
||||
console.error(e);
|
||||
if (!e) {
|
||||
console.log("Success.");
|
||||
console.log("Configuration is required for Bucket Notification to AMQP.");
|
||||
console.log("Configuration is required for Keycloak.");
|
||||
} else {
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue