We use a base document class and a concept of data "abstractions" that extend the based document object to accommodate various document fields depending on the data abstraction(browser tab, file, note or email all have different data we might want to index)
listDocuments() should only return the objects metadata while getDocuments() the whole object(or an array of objects)
This is esp. helpful for data abstractions where data is stored directly in the database (notes, todo items, browser tabs).
Additionally, we need to decide which fields to index and what type of index should be used on a given field of a data abstraction (we might want to create a bitmap index for the domain or owner or lets say the emailFrom field, a hashmap for the url or use a embedding vector/separate FTS index to represent a content of a note)
The above translates to the following idea(comments/suggestions welcome!):
{
"index": {
"bitmap": ["meta.domain", "meta.browserName"],
"hashmap": ["data.url"] // data used to calculate the primary document checksum
},
"meta": {
// Metadata fields
},
"data": {
// Data fields
}
"versions" { /* .. */ }
}
We use a base document class and a concept of data "abstractions" that extend the based document object to accommodate various document fields depending on the data abstraction(browser tab, file, note or email all have different data we might want to index)
Here a simplified example of a browser tab
listDocuments() should only return the objects metadata while getDocuments() the whole object(or an array of objects) This is esp. helpful for data abstractions where data is stored directly in the database (notes, todo items, browser tabs).
Additionally, we need to decide which fields to index and what type of index should be used on a given field of a data abstraction (we might want to create a bitmap index for the domain or owner or lets say the emailFrom field, a hashmap for the url or use a embedding vector/separate FTS index to represent a content of a note)
The above translates to the following idea(comments/suggestions welcome!):