Ottomata has submitted this change and it was merged.

Change subject: Update CirrusSearchRequestSet avro schema
......................................................................


Update CirrusSearchRequestSet avro schema

Updates made:
* timestamp field added to make camus handling more explicit
* index field renamed to indices because it is an array, and indices is plural
* requests[].suggestionRequested field added to distinguish
  between a suggestion that was not generated, and a suggestion that
  was not requested
* int default values changed from 0 to -1 to better differentiate
  unknown values vs 0 results.

Bug: T115715
Change-Id: I8112b2c9bbaf6002908f3aa2779a487133202829
---
M refinery-camus/src/main/avro/CirrusSearchRequestSet.avsc
1 file changed, 21 insertions(+), 9 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved



diff --git a/refinery-camus/src/main/avro/CirrusSearchRequestSet.avsc 
b/refinery-camus/src/main/avro/CirrusSearchRequestSet.avsc
index 883477a..b81c597 100644
--- a/refinery-camus/src/main/avro/CirrusSearchRequestSet.avsc
+++ b/refinery-camus/src/main/avro/CirrusSearchRequestSet.avsc
@@ -5,6 +5,12 @@
   "doc": "A set of requests made by CirrusSearch to the elasticsearch user for 
a single php execution context",
   "fields": [
     {
+      "name": "ts",
+      "doc": "The timestamp, in unix time, that the request was made",
+      "type": "int",
+      "default": 0
+    },
+    {
       "name": "wikiId",
       "doc": "The wiki making this request, such as dewiki or enwiktionary",
       "type": "string",
@@ -68,7 +74,7 @@
                 "default": ""
               },
               {
-                "name": "index",
+                "name": "indices",
                 "doc": "The list of indices the request was performed against",
                 "type": {
                   "type": "array",
@@ -80,37 +86,37 @@
                 "name": "tookMs",
                 "doc": "The number of milliseconds between passing the query 
to the client library and getting the response back in the application",
                 "type": "int",
-                "default": 0
+                "default": -1
               },
               {
                 "name": "elasticTookMs",
                 "doc": "The number of milliseconds the query took, according 
to the elasticsearch response",
                 "type": "int",
-                "default": 0
+                "default": -1
               },
               {
                 "name": "limit",
                 "doc": "The maximum number of results requested by the 
application",
                 "type": "int",
-                "default": 0
+                "default": -1
               },
               {
                 "name": "hitsTotal",
                 "doc": "The approximate total number of documents matching the 
query",
                 "type": "int",
-                "default": 0
+                "default": -1
               },
               {
                 "name": "hitsReturned",
                 "doc": "The number of results returned to the application",
                 "type": "int",
-                "default": 0
+                "default": -1
               },
               {
                 "name": "hitsOffset",
                 "doc": "The offset of the query",
                 "type": "int",
-                "default": 0
+                "default": -1
               },
               {
                 "name": "namespaces",
@@ -123,13 +129,19 @@
               },
               {
                 "name": "suggestion",
-                "doc": "The suggestion generated by elasticsearch, or null if 
not requested",
+                "doc": "The suggestion generated by elasticsearch",
                 "type": "string",
                 "default": ""
+              },
+              {
+                "name": "suggestionRequested",
+                "doc": "If a suggestion was requested from elasticsearch",
+                "type": "boolean",
+                "default": false
               }
             ]
           }
         }
      }
   ]
-}
\ No newline at end of file
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/246990
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8112b2c9bbaf6002908f3aa2779a487133202829
Gerrit-PatchSet: 3
Gerrit-Project: analytics/refinery/source
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: Madhuvishy <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to