mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-27 01:13:27 +03:00
cleanup
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
f3c034bdc1
commit
2861588d4c
@ -55,6 +55,4 @@ export function configurePlatform() {
|
|||||||
addLocation(contactId, () => import(/* webpackChunkName: "contact" */ '@anticrm/contact-resources'))
|
addLocation(contactId, () => import(/* webpackChunkName: "contact" */ '@anticrm/contact-resources'))
|
||||||
addLocation(chunterId, () => import(/* webpackChunkName: "chunter" */ '@anticrm/chunter-resources'))
|
addLocation(chunterId, () => import(/* webpackChunkName: "chunter" */ '@anticrm/chunter-resources'))
|
||||||
addLocation(recruitId, () => import(/* webpackChunkName: "recruit" */ '@anticrm/recruit-resources'))
|
addLocation(recruitId, () => import(/* webpackChunkName: "recruit" */ '@anticrm/recruit-resources'))
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,51 +1,47 @@
|
|||||||
//
|
//
|
||||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||||
// Copyright © 2021 Hardcore Engineering Inc.
|
// Copyright © 2021 Hardcore Engineering Inc.
|
||||||
//
|
//
|
||||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License. You may
|
// you may not use this file except in compliance with the License. You may
|
||||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||||
//
|
//
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
//
|
//
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
|
|
||||||
import { Client } from '@elastic/elasticsearch'
|
import { Client } from '@elastic/elasticsearch'
|
||||||
|
|
||||||
|
|
||||||
const url = process.env.ELASTIC_URL
|
const url = process.env.ELASTIC_URL
|
||||||
if (url === undefined) {
|
if (url === undefined) {
|
||||||
console.error('please provide elastic url.')
|
console.error('please provide elastic url.')
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
const client = new Client({node: 'http://45.32.149.163:9200/'})
|
const client = new Client({ node: 'http://45.32.149.163:9200/' })
|
||||||
|
|
||||||
client.ingest.putPipeline({
|
client.ingest.putPipeline({
|
||||||
id: 'anticrm-pipeline',
|
id: 'anticrm-pipeline',
|
||||||
body: {
|
body: {
|
||||||
"processors" : [
|
processors: [
|
||||||
{ "attachment" : { "field" : "attachment" } },
|
{ attachment: { field: 'attachment' } },
|
||||||
{ "remove" : { "field" : "attachment" } }
|
{ remove: { field: 'attachment' } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(function () {
|
.then(function () {
|
||||||
console.log("putPipeline Resolved");
|
console.log('putPipeline Resolved')
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log("putPipeline error: " + error)
|
console.log('putPipeline error: ', error)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// // Create index
|
// // Create index
|
||||||
// client.create({index: 'pdfs', type: 'pdf', id: 'my-index-id',
|
// client.create({index: 'pdfs', type: 'pdf', id: 'my-index-id',
|
||||||
// body: {description: 'Test pdf indexing'}
|
// body: {description: 'Test pdf indexing'}
|
||||||
// })
|
// })
|
||||||
// .then(function () {console.log("Index created");})
|
// .then(function () {console.log("Index created");})
|
||||||
@ -63,4 +59,4 @@ client.ingest.putPipeline({
|
|||||||
|
|
||||||
// client.indices.putMapping({index:"pdfs", type:"pdf", body:body})
|
// client.indices.putMapping({index:"pdfs", type:"pdf", body:body})
|
||||||
// .then((response) => {addPipeline()})
|
// .then((response) => {addPipeline()})
|
||||||
// .catch((error) => {console.log("putMapping error: " + error)})
|
// .catch((error) => {console.log("putMapping error: " + error)})
|
||||||
|
Loading…
Reference in New Issue
Block a user