Skip to content
nmyza edited this page Dec 20, 2016 · 6 revisions

#Schemas Application schema

#Parser start curl -H "Content-Type: application/json" -X POST -d '<json>' http://localhost:5000/api/start

это команда на старт парсера

а это пример  тела:

{
"connection_settings":
    {
        "server":"10.0.0.127", 
         "port":"8091",
         "bucket":"train_data_1"
    },
"parsing_rules":
    [
        {
            "name":"CATEGORY",
            "source_type":"field",
            "source_name":"category",
        },
        {    
            "name":"SUBCATEGORY",
            "source_type":"field",
            "source_name":"subcategory",
            "filter":"!null"
        }
    ]
}

#Message from Parser to Indexer Two numbers separated by comma(?) separator. The numbers are count of bytes in fields after (:) separator

Custom TCP message:

3,4:ssswwww

Parsed as 2 fiesds with 3 and 4 characters(?) accordingly:

sss
wwww
Clone this wiki locally