Skip to content

Commit

Permalink
palomar: proposed post and profile schema iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
bnewbold committed Aug 2, 2023
1 parent 9cd9ea2 commit 7a74f80
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 0 deletions.
69 changes: 69 additions & 0 deletions cmd/palomar/post_schema.json
Original file line number Diff line number Diff line change
@@ -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" }
}
}
}
}
62 changes: 62 additions & 0 deletions cmd/palomar/profile_schema.json
Original file line number Diff line number Diff line change
@@ -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" }
}
}
}
}

0 comments on commit 7a74f80

Please sign in to comment.