Skip to content

Instantly share code, notes, and snippets.

View szabizs's full-sized avatar
:octocat:
Knowledge is to be shared

Szabolcs Zsoldos szabizs

:octocat:
Knowledge is to be shared
  • Materom
  • Romania, Targu Mures
View GitHub Profile
@szabizs
szabizs / index_product_in_elasticsearch.txt
Last active January 23, 2023 22:14
Index a product in Elasticsearch for an ecommerce project
curl --location --request POST 'localhost:9200/ecom/_doc/123' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Adidas NMD_R1 V3",
"description": "adasad ada das dasd asd",
"price": "154.00",
"filters": [
{
"name": "shoe_size",
"pretty_name": "Shoe size",
@szabizs
szabizs / create_elasticsearch_index_with_mapping.txt
Last active January 23, 2023 22:13
Create an Elasticsearch index with mapping for an ecommerce project
curl --location --request PUT 'localhost:9200/ecom' \
--header 'Content-Type: application/json' \
--data-raw '{
"mappings": {
"dynamic": true,
"properties": {
"title": {
"type": "text",
"copy_to": "all_filters"
},