]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-630: Update ES mappings for ES 5.
authorRay Lee <ray.lee@lyrasis.org>
Fri, 3 May 2019 21:58:39 +0000 (14:58 -0700)
committerRay Lee <ray.lee@lyrasis.org>
Fri, 3 May 2019 21:58:39 +0000 (14:58 -0700)
3rdparty/nuxeo/nuxeo-server/9.10-HF30/config/proto-elasticsearch-extension.xml
services/common/src/main/cspace/config/services/tenants/materials/materials-tenant-bindings.delta.xml

index 3a30651dac640cba7170c705e8ff1d9aa50a1c02..46b0d64f6a1bd489dca9b5affcc05167090ebf75 100644 (file)
       {
         "analysis" : {
           "char_filter" : {
-            "refname_displayname" : {
+            "refname_displayname_char_filter" : {
               "type" : "pattern_replace",
               "pattern" : "^.*?'(.*)'$",
               "replacement" : "$1"
             },
-            "refname_shortid" : {
+            "refname_shortid_char_filter" : {
               "type" : "pattern_replace",
               "pattern" : "^.*:item:name\\((.*)\\).*$",
               "replacement" : "$1"
             },
-            "doctype_tenant_unqualified" : {
+            "doctype_tenant_unqualified_char_filter" : {
               "type" : "pattern_replace",
               "pattern" : "^(.*?)(Tenant.*)?$",
               "replacement" : "$1"
             }
           },
           "filter" : {
-            "en_stem_filter" : {
-              "name" : "minimal_english",
-              "type" : "stemmer"
+            "truncate_filter": {
+              "length": 256,
+              "type": "truncate"
             },
-            "en_stop_filter" : {
-              "stopwords" : [
+            "en_stem_filter": {
+              "name": "minimal_english",
+              "type": "stemmer"
+            },
+            "en_stop_filter": {
+              "stopwords": [
                 "_english_"
               ],
-              "type" : "stop"
-            },
-            "fr_elision_filter" : {
-              "articles" : [
-                "c",
-                "l",
-                "m",
-                "t",
-                "qu",
-                "n",
-                "s",
-                "j"
-              ],
-              "type" : "elision"
+              "type": "stop"
             },
-            "fr_stem_filter" : {
-              "name" : "minimal_french",
-              "type" : "stemmer"
+            "word_delimiter_filter": {
+              "type": "word_delimiter",
+              "preserve_original": true
             },
-            "fr_stop_filter" : {
-              "stopwords" : [
-                "_french_"
-              ],
-              "type" : "stop"
+            "asciifolding_filter": {
+              "type": "asciifolding",
+              "preserve_original": true
             }
           },
           "tokenizer" : {
-            "path_tokenizer" : {
-              "delimiter" : "/",
-              "type" : "path_hierarchy"
+            "path_tokenizer": {
+              "delimiter": "/",
+              "type": "path_hierarchy"
+            },
+            "ngram_tokenizer": {
+              "type": "nGram",
+              "min_gram": 3,
+              "max_gram": 12
             }
           },
           "analyzer" : {
-            "en_analyzer" : {
-              "alias" : "fulltext",
-              "filter" : [
+            "fulltext": {
+              "filter": [
+                "word_delimiter_filter",
                 "lowercase",
                 "en_stop_filter",
                 "en_stem_filter",
-                "asciifolding"
+                "asciifolding_filter"
               ],
-              "type" : "custom",
-              "tokenizer" : "standard"
+              "type": "custom",
+              "tokenizer": "standard"
             },
-            "fr_analyzer" : {
-              "filter" : [
+            "path_analyzer": {
+              "type": "custom",
+              "tokenizer": "path_tokenizer"
+            },
+            "lowercase_analyzer": {
+              "type": "custom",
+              "filter": [
                 "lowercase",
-                "fr_stop_filter",
-                "fr_stem_filter",
-                "asciifolding",
-                "fr_elision_filter"
+                "asciifolding"
               ],
-              "type" : "custom",
-              "tokenizer" : "standard"
+              "tokenizer": "keyword"
             },
-            "path_analyzer" : {
-              "type" : "custom",
-              "tokenizer" : "path_tokenizer"
+            "ngram_analyzer": {
+              "type": "custom",
+              "filter": [
+                "lowercase"
+              ],
+              "tokenizer": "ngram_tokenizer"
             },
             "refname_displayname_analyzer" : {
               "type" : "custom",
               "tokenizer" : "keyword",
-              "char_filter" : ["refname_displayname"]
+              "char_filter" : ["refname_displayname_char_filter"]
             },
             "refname_displayname_fulltext_analyzer" : {
-              "char_filter" : ["refname_displayname"],
+              "char_filter" : ["refname_displayname_char_filter"],
               "filter" : [
+                "word_delimiter_filter",
                 "lowercase",
                 "en_stop_filter",
                 "en_stem_filter",
-                "asciifolding"
+                "asciifolding_filter"
               ],
               "type" : "custom",
               "tokenizer" : "standard"
             "refname_shortid_analyzer" : {
               "type" : "custom",
               "tokenizer" : "keyword",
-              "char_filter" : ["refname_shortid"]
+              "char_filter" : ["refname_shortid_char_filter"]
             },
             "doctype_analyzer" : {
               "type" : "custom",
               "tokenizer" : "keyword",
-              "char_filter" : ["doctype_tenant_unqualified"]
+              "char_filter" : ["doctype_tenant_unqualified_char_filter"]
             },
             "sorting_analyzer" : {
               "filter" : [
               "type" : "custom",
               "tokenizer" : "keyword"
             },
-            "default" : {
-              "type" : "custom",
-              "tokenizer" : "keyword"
+            "default": {
+              "type": "custom",
+              "tokenizer": "keyword",
+              "filter": [
+                "truncate_filter"
+              ]
             }
           }
         }
 
     <mapping>
       {
-        "_size" : {
-          "enabled" : true
-        },
+        // For now, don't index a field unless there's a mapping explicitly defined. This keeps the
+        // index as small as possible. We may want to turn this on in the future, to support arbitrary
+        // searches through Elasticsearch, e.g. NXQL queries for ad hoc reporting in the CSpace UI.
+        "dynamic": false,
         "_all" : {
-          "analyzer" : "fulltext"
+          "enabled": false
         },
         "properties" : {
+          "all_field": {
+            "type": "text",
+            "analyzer": "fulltext"
+          },
           "ecm:currentLifeCycleState": {
-            "type": "string",
-            "include_in_all": "false"
+            "type": "keyword"
           },
           "ecm:primaryType": {
-            "type": "string",
-            "analyzer" : "doctype_analyzer",
-            "include_in_all": "false"
+            "type": "text",
+            "analyzer" : "doctype_analyzer"
           }
         }
       }
     </mapping>
   </elasticSearchIndex>
-</extension>
\ No newline at end of file
+</extension>
index 8bdd9f99075f6792dd2dcf1dfad91d6be5a55436..60ed12aad0b320ba84b144cfd550e2abcfb36d75 100644 (file)
                 // index as small as possible. We may want to turn this on in the future, to support arbitrary
                 // searches through Elasticsearch, e.g. NXQL queries for ad hoc reporting in the CSpace UI.
                 "dynamic": false,
-                "_size" : {
-                  "enabled" : true
-                },
                 "_all" : {
-                  "analyzer" : "fulltext"
+                  "enabled": false
                 },
                 "_source": {
                   "includes": [
                   ]
                 },
                 "properties" : {
+                  "all_field": {
+                    "type": "text",
+                    "analyzer": "fulltext"
+                  },
+
                   "ecm:currentLifeCycleState": {
-                    "type": "string",
-                    "include_in_all": "false"
+                    "type": "keyword"
                   },
                   "ecm:name": {
-                    "type": "string",
-                    "include_in_all": "false"
+                    "type": "keyword"
                   },
                   "ecm:primaryType": {
-                    "type": "string",
-                    "analyzer" : "doctype_analyzer",
-                    "include_in_all": "false"
+                    "type": "text",
+                    "analyzer" : "doctype_analyzer"
                   },
 
                   "collectionspace_denorm:title": {
-                    "type": "string",
-                    "analyzer" : "sorting_analyzer",
-                    "include_in_all": "false"
+                    "type": "text",
+                    "analyzer": "sorting_analyzer"
                   },
                   "collectionspace_denorm:commercialNames": {
-                    "type": "string",
-                    "analyzer" : "fulltext",
-                    "include_in_all": "false"
+                    "type": "text",
+                    "analyzer": "fulltext"
                   },
                   "collectionspace_denorm:commonNames": {
-                    "type": "string",
-                    "analyzer" : "fulltext",
-                    "include_in_all": "false"
+                    "type": "text",
+                    "analyzer": "fulltext"
                   },
                   "collectionspace_denorm:holdingInstitutions": {
-                    "type": "string",
+                    "type": "keyword",
+                    "copy_to": "all_field",
                     "fields": {
                       "displayName": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_displayname_analyzer"
                       }
                     }
                     "type": "date",
                     // Sometimes the timestamp only has a two digit fractional second, instead of three.
                     // From imported data??
-                    "format" : "date_time||yyyy-MM-dd'T'HH:mm:ss.SSZZ",
-                    "include_in_all": "false"
+                    "format" : "date_time||yyyy-MM-dd'T'HH:mm:ss.SSZZ"
                   },
 
                   "materials_common:shortIdentifier": {
-                    "type": "string"
+                    "type": "keyword",
+                    "copy_to": "all_field"
                   },
                   "materials_common:materialTermGroupList": {
                     "type": "object",
                     "properties": {
                       "termDisplayName": {
-                        "type": "string"
+                        "type": "text",
+                        "copy_to": "all_field"
                       }
                     }
                   },
                   "materials_common:publishToList": {
-                    "type": "string",
-                    "include_in_all": "false",
+                    "type": "keyword",
                     "fields": {
                       "shortid": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_shortid_analyzer"
                       }
                     }
                     "type": "object",
                     "properties": {
                       "materialCompositionFamilyName": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                       },
                       "materialCompositionClassName": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                       },
                       "materialCompositionGenericName": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     }
                   },
                   "materials_common:description": {
-                    "type": "string",
-                    "analyzer" : "fulltext"
+                    "type": "text",
+                    "analyzer" : "fulltext",
+                    "copy_to": "all_field"
                   },
                   "materials_common:typicalUses": {
-                    "type": "string",
+                    "type": "keyword",
+                    "copy_to": "all_field",
                     "fields": {
                       "displayName": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_displayname_analyzer"
                       }
                     }
                     "type": "object",
                     "properties": {
                       "materialProductionOrganization": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_fulltext_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "materialProductionPerson": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_fulltext_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "materialProductionPlace": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_fulltext_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "featuredApplication": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     }
                   },
                   "materials_common:commonForm": {
-                    "type": "string",
+                    "type": "keyword",
+                    "copy_to": "all_field",
                     "fields": {
                       "displayName": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_displayname_analyzer"
                       }
                     }
                     "type": "object",
                     "properties": {
                       "formType": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "acousticalPropertyType": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "durabilityPropertyType": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "electricalPropertyType": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "hygrothermalPropertyType": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "mechanicalPropertyType": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "opticalPropertyType": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "sensorialPropertyType": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "smartMaterialPropertyType": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "additionalPropertyType": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "recycledContentQualifier": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "lifecycleComponent": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                     "type": "object",
                     "properties": {
                       "certificationProgram": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                   },
                   // Process
                   "materials_common:castingProcesses": {
-                    "type": "string",
+                    "type": "keyword",
+                    "copy_to": "all_field",
                     "fields": {
                       "displayName": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_displayname_analyzer"
                       }
                     }
                   },
                   "materials_common:joiningProcesses": {
-                    "type": "string",
+                    "type": "keyword",
+                    "copy_to": "all_field",
                     "fields": {
                       "displayName": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_displayname_analyzer"
                       }
                     }
                   },
                   "materials_common:moldingProcesses": {
-                    "type": "string",
+                    "type": "keyword",
+                    "copy_to": "all_field",
                     "fields": {
                       "displayName": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_displayname_analyzer"
                       }
                     }
                   },
                   "materials_common:surfacingProcesses": {
-                    "type": "string",
+                    "type": "keyword",
+                    "copy_to": "all_field",
                     "fields": {
                       "displayName": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_displayname_analyzer"
                       }
                     }
                   },
                   "materials_common:deformingProcesses": {
-                    "type": "string",
+                    "type": "keyword",
+                    "copy_to": "all_field",
                     "fields": {
                       "displayName": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_displayname_analyzer"
                       }
                     }
                   },
                   "materials_common:machiningProcesses": {
-                    "type": "string",
+                    "type": "keyword",
+                    "copy_to": "all_field",
                     "fields": {
                       "displayName": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_displayname_analyzer"
                       }
                     }
                   },
                   "materials_common:rapidPrototypingProcesses": {
-                    "type": "string",
+                    "type": "keyword",
+                    "copy_to": "all_field",
                     "fields": {
                       "displayName": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_displayname_analyzer"
                       }
                     }
                     "type": "object",
                     "properties": {
                       "additionalProcess": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                   },
 
                   "collectionobjects_common:objectNumber": {
-                    "type": "string"
+                    "type": "keyword",
+                    "copy_to": "all_field"
                   },
                   "collectionobjects_common:publishToList": {
-                    "type": "string",
-                    "include_in_all": "false",
+                    "type": "keyword",
                     "fields": {
                       "shortid": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_shortid_analyzer"
                       }
                     }
                     "type": "object",
                     "properties": {
                       "material": {
-                        "type": "string",
+                        "type": "keyword",
+                        "copy_to": "all_field",
                         "fields": {
                           "displayName": {
-                            "type": "string",
+                            "type": "text",
                             "analyzer": "refname_displayname_analyzer"
                           }
                         }
                   },
 
                   "media_materials:publishToList": {
-                    "type": "string",
-                    "include_in_all": "false",
+                    "type": "keyword",
                     "fields": {
                       "shortid": {
-                        "type": "string",
+                        "type": "text",
                         "analyzer": "refname_shortid_analyzer"
                       }
                     }