{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0,
    "analysis": {
      "analyzer": {
        "arabic_text": {
          "type": "custom",
          "tokenizer": "standard",
          "filter": ["lowercase", "arabic_normalization", "arabic_stemmer"]
        },
        "multilingual": {
          "type": "custom",
          "tokenizer": "standard",
          "filter": ["lowercase", "arabic_normalization"]
        }
      },
      "filter": {
        "arabic_stemmer": {
          "type": "stemmer",
          "language": "arabic"
        }
      }
    }
  },
  "mappings": {
    "properties": {
      "reference_id": { "type": "integer" },
      "user_id": { "type": "integer" },
      "title": {
        "type": "text",
        "analyzer": "multilingual",
        "fields": {
          "keyword": { "type": "keyword" }
        }
      },
      "authors": {
        "type": "text",
        "analyzer": "standard",
        "fields": {
          "keyword": { "type": "keyword" }
        }
      },
      "year": { "type": "integer" },
      "publication_type": { "type": "keyword" },
      "section_heading": {
        "type": "text",
        "analyzer": "multilingual",
        "fields": {
          "keyword": { "type": "keyword" }
        }
      },
      "chunk_index": { "type": "integer" },
      "text": {
        "type": "text",
        "analyzer": "arabic_text",
        "fields": {
          "standard": {
            "type": "text",
            "analyzer": "standard"
          }
        }
      },
      "language": { "type": "keyword" },
      "summary": {
        "type": "text",
        "analyzer": "arabic_text",
        "fields": {
          "standard": {
            "type": "text",
            "analyzer": "standard"
          }
        }
      },
      "created_at": { "type": "date" }
    }
  }
}
