Skip to content
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"template": {
"mappings": {
"properties": {
"id": {
"type": "keyword"
},
"_allow_access_control": {
"type": "keyword"
},
"_deny_access_control": {
"type": "keyword"
},
"title": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
},
"copy_to": [
"content_semantic"
]
},
"description": {
"type": "text",
"copy_to": [
"content_semantic"
]
},
"content": {
"type": "text",
"copy_to": [
"content_semantic"
]
},
"content_semantic": {
"type": "semantic_text"
},
"url": {
"type": "keyword"
},
"type": {
"type": "keyword"
},
"provenance": {
"type": "keyword"
},
"owner": {
"properties": {
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"email_address": {
"type": "keyword"
},
"id": {
"type": "keyword"
}
}
},
"keywords": {
"type": "text"
},
"tags": {
"type": "keyword"
},
"created_at": {
"type": "date"
},
"updated_at": {
"type": "date"
},
"metadata": {
"dynamic": true,
"properties": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"template": {
"mappings": {
"properties": {
"comments": {
Copy link
Member

Choose a reason for hiding this comment

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

One thing that I conveniently skipped in the POC is attachments... comments can have attachments, for sure in sources like github and salesforce

Can we add minimal template for attachment, have a list of attachments in the comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah good call. We probably need attachments as a top-level field, too.

"type": "nested",
"properties": {
"id": {
"type": "keyword"
},
"author": {
"properties": {
"email": {
"type": "keyword"
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"id": {
"type": "keyword"
}
}
},
"content": {

Choose a reason for hiding this comment

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

Semantic text for comment text?

Choose a reason for hiding this comment

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

++ comment content might be elaborate enough to be a good fit for semantic text

Copy link
Member

Choose a reason for hiding this comment

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

Note: semantic_text does not support nested fields, and this is not on our roadmap to support.

Copy link
Member Author

Choose a reason for hiding this comment

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

@kderusso what would be your suggestion on how to solve this today? copy_to a top-level field?

Copy link
Member

Choose a reason for hiding this comment

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

That's a good question. I would need to verify if copy_to works with nested (I am not sure off the top of my head) but assuming it did, you'd lose the uniqueness that each comment text would have. I'm not sure if that's a deal breaker for search use cases - we would perform semantic search over all comments. It's worth digging into a bit more for sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

It would be very nice to be able to do a semantic query where I know I'd posted a message about ____ but can't remember the exact phrasing used, but don't want threads where other people were talking about ____. It's a real shame that we can't do nested semantic_text. :/

"type": "text"
},
"replies_to": {
"type": "keyword"
},
"created_at": {
"type": "date"
},
"updated_at": {
"type": "date"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"index_patterns": ["content-chat-support-v1-*"],
"template": {
"mappings": {
"properties": {
"metadata": {
"properties": {
"support": {
"properties": {
"status": {
"type": "keyword"
},
"assignee": {
"properties": {
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"email_address": {
"type": "keyword"
},
"id": {
"type": "keyword"
}
}
},
"category": {
"type": "keyword"
},
"customer": {
"properties": {
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"email_address": {
"type": "keyword"
},
"id": {
"type": "keyword"
}
}
},
"resolved_at": {
"type": "date"
},
"urgency": {
"type": "keyword"
}
}
}
}
}
}
}
},
"composed_of": ["base-template", "comments-template"],
"version": 1
}