diff --git a/cmd/palomar/post_schema.json b/cmd/palomar/post_schema.json new file mode 100644 index 000000000..c2391ae41 --- /dev/null +++ b/cmd/palomar/post_schema.json @@ -0,0 +1,69 @@ +{ +"settings": { + "index": { + "analysis": { + "analyzer": { + "default": { + "type": "custom", + "tokenizer": "standard", + "filter": [ "lowercase", "asciifolding" ] + }, + "textIcu": { + "type": "custom", + "tokenizer": "icu_tokenizer", + "char_filter": [ "icu_normalizer" ], + "filter": [ "icu_folding" ] + }, + "textIcuSearch": { + "type": "custom", + "tokenizer": "icu_tokenizer", + "char_filter": [ "icu_normalizer" ], + "filter": [ "icu_folding" ] + } + }, + "normalizer": { + "default": { + "type": "custom", + "char_filter": [], + "filter": ["lowercase"] + }, + "caseSensitive": { + "type": "custom", + "char_filter": [], + "filter": [] + } + } + } + } +}, +"mappings": { + "_doc": { + "properties": { + "doc_index_ts": { "type": "date" }, + "created_at": { "type": "date" }, + "did": { "type": "keyword", "normalizer": "default", "doc_values": false }, + "handle": { "type": "keyword", "normalizer": "default", "copy_to": "everything" }, + "display_name": { "type": "keyword", "normalizer": "default", "copy_to": "everything" }, + "tid": { "type": "keyword", "normalizer": "default" }, + + "text": { "type": "text", "index": true, "analyzer": "textIcu", "search_analyzer":"textIcuSearch", "copy_to": "everything" }, + + "mention_did": { "type": "keyword", "normalizer": "default", "doc_values": false }, + "mention_handle": { "type": "keyword", "normalizer": "default" }, + "embed_url": { "type": "keyword", "normalizer": "default" }, + "embed_text": { "type": "text", "index": true, "analyzer": "textIcu", "search_analyzer":"textIcuSearch", "copy_to": "everything" }, + "quote_uri": { "type": "keyword", "normalizer": "default" }, + "reply_parent_uri": { "type": "keyword", "normalizer": "default" }, + "reply_root_uri": { "type": "keyword", "normalizer": "default" }, + "record_label": { "type": "keyword", "normalizer": "default", "copy_to": "label" }, + "repo_label": { "type": "keyword", "normalizer": "default", "copy_to": "label" }, + "lang_code": { "type": "keyword", "normalizer": "default" }, + "img_count": { "type": "integer" }, + "img_alt_text": { "type": "text", "index": true, "analyzer": "textIcu", "search_analyzer":"textIcuSearch", "copy_to": "everything" }, + + "label": { "type": "keyword", "normalizer": "default" }, + "everything": { "type": "text", "index": true, "analyzer": "textIcu", "search_analyzer":"textIcuSearch" } + } + } +} +} diff --git a/cmd/palomar/profile_schema.json b/cmd/palomar/profile_schema.json new file mode 100644 index 000000000..26432397e --- /dev/null +++ b/cmd/palomar/profile_schema.json @@ -0,0 +1,62 @@ +{ +"settings": { + "index": { + "analysis": { + "analyzer": { + "default": { + "type": "custom", + "tokenizer": "standard", + "filter": [ "lowercase", "asciifolding" ] + }, + "textIcu": { + "type": "custom", + "tokenizer": "icu_tokenizer", + "char_filter": [ "icu_normalizer" ], + "filter": [ "icu_folding" ] + }, + "textIcuSearch": { + "type": "custom", + "tokenizer": "icu_tokenizer", + "char_filter": [ "icu_normalizer" ], + "filter": [ "icu_folding" ] + } + }, + "normalizer": { + "default": { + "type": "custom", + "char_filter": [], + "filter": ["lowercase"] + }, + "caseSensitive": { + "type": "custom", + "char_filter": [], + "filter": [] + } + } + } + } +}, +"mappings": { + "_doc": { + "properties": { + "doc_index_ts": { "type": "date" }, + "created_at": { "type": "date" }, + "did": { "type": "keyword", "normalizer": "default", "doc_values": false }, + "handle": { "type": "keyword", "normalizer": "default", "copy_to": "everything" }, + "display_name": { "type": "keyword", "normalizer": "default", "copy_to": "everything" }, + + "description": { "type": "text", "index": true, "analyzer": "textIcu", "search_analyzer":"textIcuSearch", "copy_to": "everything" }, + + "record_label": { "type": "keyword", "normalizer": "default", "copy_to": "label" }, + "repo_label": { "type": "keyword", "normalizer": "default", "copy_to": "label" }, + "lang_code": { "type": "keyword", "normalizer": "default" }, + "img_alt_text": { "type": "text", "index": true, "analyzer": "textIcu", "search_analyzer":"textIcuSearch", "copy_to": "everything" }, + "has_avatar": { "type": "boolean" }, + "has_banner": { "type": "boolean" }, + + "label": { "type": "keyword", "normalizer": "default" }, + "everything": { "type": "text", "index": true, "analyzer": "textIcu", "search_analyzer":"textIcuSearch" } + } + } +} +}