o19s / opensearch-ubi

OpenSearch plugin for User Behavior Insights
Apache License 2.0
6 stars 1 forks source link

Update mapping config #52

Closed jzonthemtn closed 9 months ago

jzonthemtn commented 9 months ago

New mapping:

{
  "mappings": {
    "properties": {
      "action_name": { "type": "keyword" },
      "user_id": { "type": "keyword" },
      "session_id": { "type": "keyword" },
      "query_id": { "type": "keyword" },
      "page_id": { "type": "keyword" },
      "message": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "message_type": { "type": "keyword" },
      "timestamp": {
        "type": "date",
        "format": "yyyy-MM-dd HH:mm:ss.SSSSSS||date_time",
        "doc_values": true
      },
      "event_attributes": {
        "properties": {
          "user_name": { "type": "keyword" },
          "user_id": { "type": "keyword" },
          "city": { "type": "keyword" },
          "state": { "type": "keyword" },
          "zip": { "type": "keyword" },
          "email": { "type": "keyword" },
          "price": { "type": "float" },
          "ip": {
            "type": "ip",
            "ignore_malformed": true
          },
          "browser": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "data": {
            "properties": {
              "data_id": { "type": "keyword" },
              "data_type": { "type": "text" },
              "transaction_id": { "type": "keyword" },
              "description": { "type": "text" },
              "to_user_id": { "type": "keyword" },
              "data_detail": { "type": "object" }
            }
          }
        }
      }
    }
  }
}