Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-ebp committed Apr 9, 2024
1 parent 950e88f commit fdb75bd
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions apps/server-asset-sg/src/app/scripts/export-to-elasticsearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Eq as EqString } from 'fp-ts/string';
import * as D from 'io-ts/Decoder';
import * as G from 'io-ts/Guard';
import { Overwrite } from 'type-zoo';
import * as dotenv from 'dotenv';

import { isNotNil } from '../../../../../libs/core/src/';
import { ElasticSearchAsset } from '../../../../../libs/shared/src/';
Expand All @@ -27,28 +26,8 @@ export const date: D.Decoder<unknown, Date> = D.fromGuard(dateGuard, 'Date');
export const dateIdFromDate = (d: Date) => (d.getFullYear() * 10000 + (d.getMonth() + 1) * 100 + d.getDate()) as DateId;
export const DateIdFromDate = pipe(date, D.map(dateIdFromDate));

dotenv.config();

const index = 'swissgeol_asset_asset';

const mappingProperties = {
assetId: { type: 'integer' },
properties: {
assetId: {type: "integer" },
assetKindItemCode: { type: "keyword" },
authorIds: { type: "integer" },
contactNames: { type: "text",fields: {keyword: {type: "keyword",ignore_above: 256}}},
createDate: { type: "long" },
createDateId: { type: "integer" },
languageItemCode: { type: "keyword" },
manCatLabelItemCodes: { type: "keyword" },
sgsId: { type: "keyword" },
titleOriginal: { type: "text", fields: { keyword: { type: "keyword", ignore_above: 256 }} },
titlePublic: {type: "text",fields: {keyword: {type: "keyword",ignore_above: 256}}},
usageCode: { type: "keyword" }
}
};

const main = async () => {
try {
const options = {
Expand All @@ -68,15 +47,6 @@ const main = async () => {

console.log('connected');


const exists = await client.indices.exists({ index });
if (!exists) {
/* await client.indices.create({
index,
mappings: mappingProperties
});*/
}

const prisma = new PrismaClient();

const RawAsset = D.struct({
Expand Down

0 comments on commit fdb75bd

Please sign in to comment.