Table of Contents

Similarity Index API

branch01.picalike.corpex-kunden.de:9095/index_query

loadbalancer: http://similarity-index.lb.int.picalike.corpex-kunden.de:80/
url (legacy oder upload): http://branch01.picalike.corpex-kunden.de:9095/index_query
host: branch01.picalike.corpex-kunden.de
port: 9095
service name: /index_query
method: POST with a JSON

reload an index

all workers: http://branch01.picalike.corpex-kunden.de:9095/index_reload
worker one by one:
* tower01: http://tower01.picalike.corpex-kunden.de:4238/reload
* dev01: http://dev01.picalike.corpex-kunden.de:4238/reload
method: POST with a JSON
* index_name = The name of the indexes to be reloaded

git

picalike@sg01.picalike.corpex-kunden.de/home/picalike/repositories/v5/picalike_v5.git

deployment

SSH auf die Server, picalike@dev01 und neuron_cloud@tower01
screen -r index
es gibt zwei screen tabs:

parameters

{"shop_id":"witt_de_feed"}
{"shop_id":{"$in":["witt_de_feed", "peterhahn_de_crawler"]}}
{"timestamp" :{
        "$gte": 1544199370.0,
        "$lt": 1544199371.0
    }
}
{"$or":[
    {"metadata.min_price" :{
            "$lt": 5000
        }
    },
    {"metadata.max_price" :{
            "$gte": 1000
        }
    }
    ]
}
{"$and":[
    {"shop_id":"witt_de_feed"},
    {"timestamp" :{
            "$gte": 1544199370.0,
            "$lt": 1544199371.0
        }
    }
    ]
}

out

'root_images' → the reference image
'close_images_filtered_in' → the closest images, that match the filter
'hostname_worker' → the machine that did the job
'last_index_update' → last time the index in the worker was updated last_index_update
'errors' → list of happend errors

{
    "_time_1_overall_ms": 7.35,
    "_time_2_get_args_ms": 0.15,
    "_time_3_get_root_ms": 2.14,
    "_time_4_feature_request_ms": 1.1,
    "_time_5_get_prod_ids_ms": 0.98,
    "_time_6_get_meta_data_ms": 2.98,
    "_time_7_sort_meta_data_ms": 0.02,
    "close_images_filtered_in": [
        {
            "distance": 0.0,
            "int_id": 5,
            "product_data": [
                {
                    "matches_db_filter": true,
                    "picalike_id": "9690328#asos_de_crawler",
                    "prod_id": "9690328",
                    "shop_id": "asos_de_crawler"
                }
            ],
            "url": "https://images.asos-media.com/products/asos-design-marineblaue-touchscreen-handschuhe/9690328-1-navy"
        },
        {
            "distance": 1.0188307896896731e-05,
            "int_id": 717894,
            "product_data": [
                {
                    "matches_db_filter": true,
                    "picalike_id": "9707579#asos_de_crawler",
                    "prod_id": "9707579",
                    "shop_id": "asos_de_crawler"
                }
            ],
            "url": "https://images.asos-media.com/products/asos-design-touch-screen-handschuhe-aus-wieder-aufbereitetem-polyester/9707579-1-navy"
        }
    ],
    "product_data_flat": [
        {
            "distance": 0.0,
            "matches_db_filter": true,
            "picalike_id": "9690328#asos_de_crawler",
            "prod_id": "9690328",
            "shop_id": "asos_de_crawler"
        },
        {
            "distance": 1.0188307896896731e-05,
            "matches_db_filter": true,
            "picalike_id": "9707579#asos_de_crawler",
            "prod_id": "9707579",
            "shop_id": "asos_de_crawler"
        }
    ],
    "root_images": [
        {
            "picalike_id": [
                "9690328#asos_de_crawler"
            ],
            "prod_id": [
                "9690328"
            ],
            "shop_id": [
                "asos_de_crawler"
            ],
            "url": "https://images.asos-media.com/products/asos-design-marineblaue-touchscreen-handschuhe/9690328-1-navy"
        }
    ]
}