{
    "index_patterns": ["papers*"],
    "priority": 1,
    "template": {
        "aliases": {
            "papers": {}
        },
        "mappings": {
            "properties": {
                "id": {
                    "type": "keyword"
                },
                "title": {
                    "type": "text",
                    "analyzer": "title_analyzer"
                },
                "authors": {
                    "type": "text"
                },
                "topic": {
                    "type": "text"
                },
                "summary": {
                    "type": "text"
                },
                "tags": {
                    "type": "keyword"
                },
                "content": {
                    "type": "text",
                    "analyzer": "content_analyzer_engram"
                }
            }
        },
        "settings": {
            "analysis": {
                "analyzer": {
                    "title_analyzer": {
                        "type": "custom",
                        "tokenizer": "title_engram_tokenizer",
                        "filter": [
                            "lowercase"
                        ]
                    },
                    "content_analyzer_i": {
                        "type": "custom",
                        "tokenizer": "content_onchar_tokenizer",
                        "char_filter": [
                            "markdown_token_filter"
                        ]
                    },
                    "content_analyzer_s": {
                        "type": "custom",
                        "tokenizer": "content_onchar_tokenizer",
                        "char_filter": [
                            "markdown_token_filter"
                        ],
                        "filter": [
                        ]
                    },
                    "content_analyzer_engram": {
                        "type": "custom",
                        "tokenizer": "content_engram_tokenizer",
                        "char_filter": [
                            "markdown_token_filter"
                        ],
                        "filter": [
                            "lowercase"
                        ]
                    }
                },
                "tokenizer": {
                    "title_engram_tokenizer": {
                        "type": "edge_ngram",
                        "min_gram": 3,
                        "max_gram": 10,
                        "token_chars": [
                            "letter",
                            "digit"
                        ]
                    },
                    "content_onchar_tokenizer": {
                        "type": "char_group",
                        "tokenize_on_chars": [
                            "whitespace",
                            ".", ",", "(", ")", "-", "[", "]", "{", 
                            "}", "#", ":", ";", "`", "!", "*"
                        ]
                    },
                    "content_engram_tokenizer": {
                        "type": "edge_ngram",
                        "min_gram": 3,
                        "max_gram": 10,
                        "token_chars": [
                            "letter",
                            "digit"
                        ]
                    }
                },
                "char_filter": {
                    "markdown_token_filter": {
                        "type": "pattern_replace",
                        "pattern": "[[a-z][0-9]]*://[[a-z][0-9]]*.[a-z]*",
                        "replacement": ""
                    }
                },
                "filter": {
                }
            }
        }
    }
}