{
  "settings": {
    "analysis": {
      "filter": {
        "english_stop": {
          "type":       "stop",
          "stopwords":  "_english_"
        }
      },
      "tokenizer": {
        "edge_ngram_tokenizer": {
          "type": "edge_ngram",
          "min_gram": 2,
          "max_gram": 20,
          "token_chars": ["letter", "digit"]
        }
      },
      "analyzer": {
        "japanese": {
          "tokenizer": "kuromoji_tokenizer",
          "char_filter" : ["icu_normalizer"]
        },
        "english_edge_ngram": {
          "tokenizer": "edge_ngram_tokenizer",
          "filter": [
            "lowercase",
            "english_stop"
          ]
        }
      }
    }
  },
  "mappings": {
    "pages": {
      "properties" : {
        "path": {
          "type": "text",
          "fields": {
            "raw": {
              "type": "text",
              "analyzer": "keyword"
            },
            "ja": {
              "type": "text",
              "analyzer": "japanese"
            },
            "en": {
              "type": "text",
              "analyzer": "english_edge_ngram",
              "search_analyzer": "standard"
            }
          }
        },
        "body": {
          "type": "text",
          "fields": {
            "ja": {
              "type": "text",
              "analyzer": "japanese"
            },
            "en": {
              "type": "text",
              "analyzer": "english_edge_ngram",
              "search_analyzer": "standard"
            }
          }
        },
        "username": {
          "type": "keyword"
        },
        "comment_count": {
          "type": "integer"
        },
        "bookmark_count": {
          "type": "integer"
        },
        "like_count": {
          "type": "integer"
        },
        "grant": {
          "type": "integer"
        },
        "granted_users": {
          "type": "keyword"
        },
        "granted_group": {
          "type": "keyword"
        },
        "created_at": {
          "type": "date",
          "format": "dateOptionalTime"
        },
        "updated_at": {
          "type": "date",
          "format": "dateOptionalTime"
        },
        "tag_names": {
          "type": "keyword"
        }
      }
    }
  }
}
