Skip to content

Commit

Permalink
mapping: update mappings
Browse files Browse the repository at this point in the history
* add custom analyzer to multiple fields for
  documents and series, needed to be used with
  cross_fields type search
  • Loading branch information
jrcastro2 authored and ntarocco committed Oct 21, 2024
1 parent 92f34d0 commit d10b85d
Show file tree
Hide file tree
Showing 6 changed files with 519 additions and 150 deletions.
166 changes: 127 additions & 39 deletions invenio_app_ils/documents/mappings/os-v1/documents/document-v2.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"analyzer": {
"min_length_2": {
"tokenizer": "standard",
"filter": [ "min_length_2" ]
"filter": [
"min_length_2"
]
},
"custom_analyzer": {
"tokenizer": "standard",
Expand Down Expand Up @@ -70,10 +72,14 @@
"type": "date"
},
"abstract": {
"type": "text"
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
},
"alternative_abstracts": {
"type": "text"
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
},
"alternative_identifiers": {
"properties": {
Expand All @@ -98,7 +104,9 @@
"type": "keyword"
},
"value": {
"type": "text"
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
}
},
"type": "object"
Expand All @@ -120,6 +128,8 @@
},
"name": {
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer",
"fields": {
"keyword": {
"type": "keyword"
Expand All @@ -131,6 +141,8 @@
},
"alternative_names": {
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer",
"fields": {
"keyword": {
"type": "keyword"
Expand All @@ -145,12 +157,17 @@
},
"full_words": {
"type": "text",
"analyzer": "min_length_2",
"search_analyzer": "min_length_2"
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
},
"normalized_keyword": {
"type": "keyword",
"normalizer": "custom_normalizer"
},
"min_length_2": {
"type": "text",
"analyzer": "min_length_2",
"search_analyzer": "min_length_2"
}
}
},
Expand Down Expand Up @@ -228,10 +245,19 @@
"type": "boolean"
},
"document_type": {
"type": "keyword"
"type": "keyword",
"fields": {
"text": {
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
}
}
},
"edition": {
"type": "text"
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
},
"eitems": {
"properties": {
Expand Down Expand Up @@ -318,36 +344,56 @@
"extensions_keywords": {
"type": "object",
"properties": {
"key": { "type": "keyword" },
"value": { "type": "keyword" }
"key": {
"type": "keyword"
},
"value": {
"type": "keyword"
}
}
},
"extensions_texts": {
"type": "object",
"properties": {
"key": { "type": "keyword" },
"value": { "type": "text" }
"key": {
"type": "keyword"
},
"value": {
"type": "text"
}
}
},
"extensions_longs": {
"type": "object",
"properties": {
"key": { "type": "keyword" },
"value": { "type": "long" }
"key": {
"type": "keyword"
},
"value": {
"type": "long"
}
}
},
"extensions_dates": {
"type": "object",
"properties": {
"key": { "type": "keyword" },
"value": { "type": "date" }
"key": {
"type": "keyword"
},
"value": {
"type": "date"
}
}
},
"extensions_booleans": {
"type": "object",
"properties": {
"key": { "type": "keyword" },
"value": { "type": "boolean" }
"key": {
"type": "keyword"
},
"value": {
"type": "boolean"
}
}
},
"identifiers": {
Expand All @@ -361,10 +407,10 @@
"value": {
"type": "keyword",
"fields": {
"text": {
"type": "text"
}
"text": {
"type": "text"
}
}
}
},
"type": "object"
Expand All @@ -375,13 +421,22 @@
"type": "text"
},
"place": {
"type": "keyword"
"type": "keyword",
"fields": {
"text": {
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
}
}
},
"publisher": {
"type": "keyword",
"fields": {
"text": {
"type": "text"
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
}
}
},
Expand All @@ -402,10 +457,12 @@
"value": {
"type": "keyword",
"fields": {
"text": {
"type": "text"
}
"text": {
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
}
}
}
},
"type": "object"
Expand Down Expand Up @@ -492,6 +549,8 @@
},
"value": {
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer",
"fields": {
"keyword": {
"type": "keyword"
Expand Down Expand Up @@ -521,7 +580,14 @@
"type": "keyword"
},
"title": {
"type": "keyword"
"type": "keyword",
"fields": {
"text": {
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
}
}
},
"url": {
"type": "keyword"
Expand All @@ -536,13 +602,15 @@
"type": "object"
},
"note": {
"type": "text"
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
},
"number_of_pages": {
"type": "keyword",
"fields": {
"text": {
"type": "text"
"type": "text"
}
}
},
Expand All @@ -563,9 +631,11 @@
"journal_title": {
"type": "keyword",
"fields": {
"text": {
"type": "text"
}
"text": {
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
}
}
},
"journal_volume": {
Expand All @@ -574,9 +644,9 @@
"note": {
"type": "keyword",
"fields": {
"text": {
"type": "text"
}
"text": {
"type": "text"
}
}
},
"pages": {
Expand All @@ -589,7 +659,14 @@
"type": "object"
},
"publication_year": {
"type": "keyword"
"type": "keyword",
"fields": {
"text": {
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
}
}
},
"relation_types": {
"type": "keyword"
Expand Down Expand Up @@ -849,7 +926,14 @@
"type": "keyword"
},
"value": {
"type": "keyword"
"type": "keyword",
"fields": {
"text": {
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
}
}
}
},
"type": "object"
Expand Down Expand Up @@ -901,6 +985,8 @@
},
"volume": {
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer",
"fields": {
"keyword": {
"type": "keyword"
Expand Down Expand Up @@ -971,8 +1057,10 @@
"type": "object"
},
"physical_description": {
"type": "text"
"type": "text",
"analyzer": "custom_analyzer",
"search_analyzer": "custom_analyzer"
}
}
}
}
}
Loading

0 comments on commit d10b85d

Please sign in to comment.