Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2019-02-05 15:59:40 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2019-02-05 16:01:59 -0500
commit833017c359ee6a02130dd50a4d060d31d3598f22 (patch)
tree7c5df74d1b84ef850d867558049631154cf19a4e /doc
parent37a6805110997bf184a79e898ef31e5e9763364e (diff)
downloadliza-833017c359ee6a02130dd50a4d060d31d3598f22.tar.gz
liza-833017c359ee6a02130dd50a4d060d31d3598f22.tar.bz2
liza-833017c359ee6a02130dd50a4d060d31d3598f22.zip
server: Auto-populate liza_timestamp_initial_rated in metabucket
This value already existed on the document, but was inaccessible to external systems. This is now accessible to e.g. raters. * doc/bucket.texi (Metabucket): New section. * src/server/db/MongoServerDao.js (saveQuote): Set initial quoted date as liza_timestamp_initial_rated. Update metabucket keys individually so as not to inadvertently overwrite the entire metabucket. DEV-3715
Diffstat (limited to 'doc')
-rw-r--r--doc/bucket.texi30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/bucket.texi b/doc/bucket.texi
index 9a581bb..a944143 100644
--- a/doc/bucket.texi
+++ b/doc/bucket.texi
@@ -16,6 +16,7 @@
* Value Assignment:Bucket Assignment. Writing data to the Bucket.
* Bucket Diff:: Representing bucket changes.
* Calculated Values:: Dynamic data derived from other values.
+* Metabucket:: Bucket holding document metadata
@end menu
@@ -116,3 +117,32 @@ A diff is applied to the underlying bucket by invoking
@node Calculated Values
@section Calculated Values
@helpwanted
+
+
+@node Metabucket
+@section Metabucket
+@cindex Metabucket
+The @dfn{metabucket} is a loosely-structured key/value store
+ separate from the data bucket.@footnote{
+ It is stored in the @code{meta} field on the Mongo document.}
+It should be used to save data that should be accessible only to the server,
+ but never the client.
+
+The client has no means by which to access the metabucket.
+Custom fields can be populated by server-side DataAPIs
+ (@pxref{Server-Side Data API Calls}).
+
+Any fields prefixed with the string @samp{liza_} are reserved and are
+ populated automatically by the Server.
+They are shown in @ref{t:liza-meta}.
+
+@float Table, t:liza-meta
+@table @code
+ @cindex Initial rated date
+ @item liza_timestamp_initial_rated
+ A Unix timestamp representing the first time a document was acted
+ upon by a rating service.
+ This value is set once and is never updated or cleared.
+@end table
+@caption{Metabucket fields populated automatically by the Server}
+@end float