Mukhambetov
6/26/2017 - 6:28 AM

From chrome://newtab/

POST _search
{
   "query": {
      "bool": {
         "must": [
            {
               "range": {
                  "startTime": {
                     "gte": "1485441386175",
                     "format": "epoch_millis"
                  }
               }
            },
            {
               "range": {
                  "endTime": {
                     "lte": "1493250503356",
                     "format": "epoch_millis"
                  }
               }
            },
            {
               "bool": {
                  "should": [
                     {
                        "match": {
                           "company.companyId": "1erZbfNMjmTCVN7l6yFdgUHnycr1"
                        }
                     },
                     {
                        "match": {
                           "company.companyId": "3SvYKtSysuZaZJVWABqSGQvVYu03"
                        }
                     }
                  ]
               }
            }
         ]
      }
   }
}
POST _search                                        -------- тип запроса пост с путем _search
{ 
   "query": {
      "bool": {
         "must": [
            {
               "range": {                         
                  "startTime": {                  
                     "gte": "1485441386175",
                     "format": "epoch_millis"
                  }
               }
            },
            {
               "range": {
                  "endTime": {
                     "lte": "1493250503356",
                     "format": "epoch_millis"
                  }
               }
            }
         ]
      }
   }
}
https://104.198.95.235/elasticsearch/v1/events/_mapping
https://104.198.95.235/elasticsearch/v1/sales/_mapping
https://104.198.95.235/elasticsearch/v1/companies/_mapping
class
  1. country
    -fields
    0. countryId - String
    1. countryName - String
    2. refions - List<Regions>
  2. Regions
    -fields
    0. rId - String
    1. name - String
    2. latitude - float
    3. longitude - float
  3. Category
    -fields
    0. cId - string
    1. categoryName - string
    2. eventCount - Integer
    3. salesCount - Integer
  4. Company
    -fields
    0. cid - string
    1. branches - Map<Srting, Map<Integer, String>>
    2. category - Map<String, String>
    3. companyName - String
    4. content - String
    5. created - server Timestamp
    6. email - String 
    7. img - Map<String, String>
    8. inCharge - String
    9. isactive - boolean
    10. isCompany - boolean
    11. location - Map?
    12. phone - List<String>
    13. position - String
    14. title - String
    15 workTime - Map<String, String>
POST /v1/events/_search
{
  "query": {
    "bool": {
      "should": {
        "match": {
          "isActive": "true"
        }
      },
      "must": {
        "bool": {
          "should": [
            {
              "match": {
                "company.companyId": "1erZbfNMjmTCVN7l6yFdgUHnycr1"
              }
            },
            {
              "match": {
                "company.companyId": "3SvYKtSysuZaZJVWABqSGQvVYu03"
              }
            }
          ]
        }
      }
    }
  }
}
Общие
1. https://habrahabr.ru/post/280488/

IOS 
1. Alamofire на Swift
  https://habrahabr.ru/post/330760
  http://swiftbook.ru/tutorials/alamofire-getting-started

Android
1.http://square.github.io/retrofit/
  http://java-help.ru/retrofit-library/
DOCS elasticSerch
1. https://www.elastic.co/guide/en/elasticsearch/guide/current/empty-search.html
2. https://www.elastic.co/guide/en/elasticsearch/guide/current/multi-index-multi-type.html
3. https://www.elastic.co/guide/en/elasticsearch/guide/current/pagination.html
4. https://www.elastic.co/guide/en/elasticsearch/guide/current/search-lite.html
  Android
  4.1 https://stackoverflow.com/questions/3286067/url-encoding-in-android
  4.2 https://stackoverflow.com/questions/3734844/how-to-url-encode-in-android
  IOS
  4.1 https://stackoverflow.com/questions/8088473/how-do-i-url-encode-a-string
  4.2 https://stackoverflow.com/questions/8086584/objective-c-and-swift-url-encoding
  4.3 https://stackoverflow.com/questions/21403323/url-encoding-a-string
 
Весь проет Say ma say по URL-у
http://104.198.95.235/elasticsearch/v1/
 -events события
 -sales скидки
 -companies компании
 
Пример: 
http://104.198.95.235/elasticsearch/v1/sales
http://104.198.95.235/elasticsearch/v1/events
http://104.198.95.235/elasticsearch/v1/companies