Skip to content

Commit

Permalink
search: add analyzer for title search
Browse files Browse the repository at this point in the history
  • Loading branch information
Parth Shandilya committed Feb 5, 2021
1 parent 9c239c9 commit f6c8d7f
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions cernopendata/mappings/v7/records/record-v1.0.0.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
{
"mappings": {
"properties": {
"doi": {
"type": "keyword"
},
"title": {
"type": "text"
"mappings": {
"properties": {
"title": {
"type": "text",
"analyzer": "title_analyzer",
"fields": {
"exact": {
"type": "keyword"
}
}
}
}
},
"settings": {
"analysis": {
"analyzer": {
"title_analyzer": {
"tokenizer": "keyword",
"filter": [
"title_filter"
]
}
},
"filter": {
"title_filter": {
"type": "pattern_capture",
"preserve_original": true,
"patterns": [
"(/[a-zA-Z-_0-9]+)"
]
}
}
}
}
}
}

0 comments on commit f6c8d7f

Please sign in to comment.