Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions dummy-dbscript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
db.runCommand( {
createSearchIndexes: "Conversation",
indexes: [
{
name: "default",
definition: {
"mappings": {
"dynamic": false,
"fields": {
"ContactDisplayId": {
"analyzer": "containing_analyzer",
"searchAnalyzer": "lowercase_keyword_analyzer",
"type": "string"
},
"ContactName": {
"analyzer": "containing_analyzer",
"searchAnalyzer": "lowercase_keyword_analyzer",
"type": "string"
},
"ContactWaId": {
"analyzer": "containing_analyzer",
"searchAnalyzer": "lucene.keyword";
"type": "string",
},
"LastUpdated": {
"type": "date"
},
"TenantId": {
"type": "token"
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a syntax error on this line. It seems like a semicolon is missing after "lucene.keyword".

"TicketFilteringInfo": {
"fields": {
"TicketStatus": {
"type": "number"
}
},
"type": "document"
},
"_t": {
"type": "token"
}
}
},
"analyzers": [
{
"name": "lowercase_keyword_analyzer",
"tokenFilters": [
{
"type": "lowercase"
}
],
"tokenizer": {
"type": "keyword"
}
},
{
"name": "containing_analyzer",
"tokenFilters": [
{
"type": "lowercase"
}
],
"tokenizer": {
"maxGram": 50,
"minGram": 3,
"type": "nGram"
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The closing curly brace } for the indexes array seems to be misplaced. It should be after the last index definition, not after the analyzers array.

]
},
}
]
} )