Skip to content

Commit

Permalink
[KAN-62] es 필드 일부 네이밍 변경 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkyoungdeok authored May 13, 2024
1 parent 3f49afa commit 27375b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions csv-to-es.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
"mappings": {
"properties": {
"name": {"type": "text", "analyzer": "korean"},
"category": {"type": "text", "analyzer": "korean"},
"original_category": {"type": "text", "analyzer": "korean"},
"naver_review_count": {"type": "text", "analyzer": "korean"},
"address": {"type": "text", "analyzer": "korean"},
"naver_rating": {"type": "float"},
"number": {"type": "text"},
"image_url": {"type": "text"},
"custom_category": {"type": "text", "analyzer": "korean"},
"category": {"type": "text", "analyzer": "korean"},
"menus": {
"type": "nested",
"properties": {
Expand Down Expand Up @@ -79,13 +79,13 @@
print(row['name'], row['category'], row['review_count'], row['address'], rating, number, restaurant_image_url, menus)
response = es.index(index=index_name, id=row['name'], document={
"name": row['name'],
"category": row['category'],
"original_category": row['category'],
"naver_review_count": row['review_count'],
"address": row['address'],
"naver_rating": rating,
"number": number,
"image_url": restaurant_image_url,
"custom_category": row['custom_category'],
"category": row['custom_category'],
"menus": menus,
})
print(f"Indexed document ID: {response['_id']}, Result: {response['result']}")
Expand Down

0 comments on commit 27375b5

Please sign in to comment.