]docutils.nodesdocument)}( rawsourcechildren](hcomment)}(h@startuml images/stats-activity-diagram.png (*) --> "Initialize event log timer" --> "read an event_log entry" --> "read system metadata" --> "write to stats Solr index" @endumlh]hText@startuml images/stats-activity-diagram.png (*) --> "Initialize event log timer" --> "read an event_log entry" --> "read system metadata" --> "write to stats Solr index" @enduml}(hhparenth uba attributes}(ids]classes]names]dupnames]backrefs] xml:spacepreserveutagnameh hhhhsourced/var/lib/jenkins/jobs/metacat_beta/workspace/metacat/docs/user/metacat/source/statistics-service.rstlineK ubh )}(hX@startuml images/stats-query-sequence-diagram.png participant client client -> MNRestServlet : doGet(request) activate MNRestServlet MNRestServlet -> MNResourceHandler: handle(get) activate MNResourceHandler MNResourceHandler -> MNResourceHandler: doQuery(engine, query) MNResourceHandler -> MNodeService: query(engine, query) activate MNodeService MNodeService -> StatsQueryService: query(query, subjects) activate StatsQueryService StatsQueryService -> SolrServer: query(query) activate SolrServer SolrServer -> StatsQueryService: inputstream deactivate SolrServer StatsQueryService -> MNodeService: inputstream deactivate StatsQueryService MNodeService -> MNResourceHandler: inputstream deactivate MNodeService MNResourceHandler -> MNRestServlet: response deactivate MNResourceHandler MNRestServlet -> client: response deactivate MNRestServlet @endumlh]hX@startuml images/stats-query-sequence-diagram.png participant client client -> MNRestServlet : doGet(request) activate MNRestServlet MNRestServlet -> MNResourceHandler: handle(get) activate MNResourceHandler MNResourceHandler -> MNResourceHandler: doQuery(engine, query) MNResourceHandler -> MNodeService: query(engine, query) activate MNodeService MNodeService -> StatsQueryService: query(query, subjects) activate StatsQueryService StatsQueryService -> SolrServer: query(query) activate SolrServer SolrServer -> StatsQueryService: inputstream deactivate SolrServer StatsQueryService -> MNodeService: inputstream deactivate StatsQueryService MNodeService -> MNResourceHandler: inputstream deactivate MNodeService MNResourceHandler -> MNRestServlet: response deactivate MNResourceHandler MNRestServlet -> client: response deactivate MNRestServlet @enduml}(hhhh(ubah}(h]h]h]h]h ]h"h#uh$h hhhhh%h&h'K$ubhsection)}(hhh](htitle)}(h Metacat Usage Statistics Serviceh]h Metacat Usage Statistics Service}(hh?hh=hhh%Nh'Nubah}(h]h]h]h]h ]uh$h;hh8hhh%h&h'K&ubh7)}(hhh](h<)}(hOverviewh]hOverview}(hhPhhNhhh%Nh'Nubah}(h]h]h]h]h ]uh$h;hhKhhh%h&h'K)ubh paragraph)}(hHThis document describes a proposed usage statistics service for Metacat.h]hHThis document describes a proposed usage statistics service for Metacat.}(hh`hh^hhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'K*hhKhhubh])}(hiThis new service will provide Metacat usage information to clients about data and metacata access events.h]hiThis new service will provide Metacat usage information to clients about data and metacata access events.}(hhnhhlhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'K,hhKhhubeh}(h]overviewah]h]overviewah]h ]uh$h6hh8hhh%h&h'K)ubh7)}(hhh](h<)}(h Requirementsh]h Requirements}(hhhhhhh%Nh'Nubah}(h]h]h]h]h ]uh$h;hhhhh%h&h'K0ubh])}(hThe statistics service should have an easy to learn API that allows for query fields to be added and provide reports in XML, JSON.h]hThe statistics service should have an easy to learn API that allows for query fields to be added and provide reports in XML, JSON.}(hhhhhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'K2hhhhubh7)}(hhh](h<)}(hProvided Statisticsh]hProvided Statistics}(hhhhhhh%Nh'Nubah}(h]h]h]h]h ]uh$h;hhhhh%h&h'K6ubh])}(h2The service will include the following statistics:h]h2The service will include the following statistics:}(hhhhhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'K8hhhhubh block_quote)}(hhh]h bullet_list)}(hhh](h list_item)}(h Dataset viewsh]h])}(hhh]h Dataset views}(hhhhubah}(h]h]h]h]h ]uh$h\h%h&h'K:hhubah}(h]h]h]h]h ]uh$hhhubh)}(hPackage downloadsh]h])}(hhh]hPackage downloads}(hhhhubah}(h]h]h]h]h ]uh$h\h%h&h'K;hhubah}(h]h]h]h]h ]uh$hhhubh)}(h"Size in bytes of package downloadsh]h])}(hhh]h"Size in bytes of package downloads}(hhhhubah}(h]h]h]h]h ]uh$h\h%h&h'KReports must be able to be aggregated by the following fields:h]h>Reports must be able to be aggregated by the following fields:}(hj#hj!ubah}(h]h]h]h]h ]uh$jh%h&h'KQhjubh definition)}(hhh]h)}(hhh](h)}(h%User (DN, or ORCID, or some amalgam )h]h])}(hj9h]h%User (DN, or ORCID, or some amalgam )}(hj9hj;ubah}(h]h]h]h]h ]uh$h\h%h&h'KOhj7ubah}(h]h]h]h]h ]uh$hhj4ubh)}(hATime range, aggregated to requested unit (day, week, month, year)h]h])}(hjPh]hATime range, aggregated to requested unit (day, week, month, year)}(hjPhjRubah}(h]h]h]h]h ]uh$h\h%h&h'KPhjNubah}(h]h]h]h]h ]uh$hhj4ubh)}(h,Spatial range, aggregated to requested unit h]h])}(h+Spatial range, aggregated to requested unith]h+Spatial range, aggregated to requested unit}(hjkhjiubah}(h]h]h]h]h ]uh$h\h%h&h'KQhjeubah}(h]h]h]h]h ]uh$hhj4ubeh}(h]h]h]h]h ]j/j0uh$hh%h&h'KOhj1ubah}(h]h]h]h]h ]uh$j/hjubeh}(h]h]h]h]h ]uh$jh%h&h'KQhjubah}(h]h]h]h]h ]uh$jhjhhh%Nh'Nubeh}(h]results-aggregationah]h]results aggregationah]h ]uh$h6hhhhh%h&h'KLubh7)}(hhh](h<)}(h Performanceh]h Performance}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h;hjhhh%h&h'KTubh])}(hThe query service should provide results quickly, as it will be used to construct the user dashboard and possibly other UI elements.h]hThe query service should provide results quickly, as it will be used to construct the user dashboard and possibly other UI elements.}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'KVhjhhubeh}(h] performanceah]h] performanceah]h ]uh$h6hhhhh%h&h'KTubeh}(h] requirementsah]h] requirementsah]h ]uh$h6hh8hhh%h&h'K0ubh7)}(hhh](h<)}(hStatistics Service Solr Indexh]hStatistics Service Solr Index}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h;hjhhh%h&h'KYubh])}(h^Currently Metacat writes access information to the table ‘access_log’ that has the fields:h]h^Currently Metacat writes access information to the table ‘access_log’ that has the fields:}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'KZhjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h]h]h]h ]colwidthK uh$jhjubj)}(hhh]h}(h]h]h]h]h ]colwidthKuh$jhjubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h])}(hnameh]hname}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'K]hjubah}(h]h]h]h]h ]uh$jhjubj)}(hhh]h])}(h data typeh]h data type}(hj3hj1ubah}(h]h]h]h]h ]uh$h\h%h&h'K]hj.ubah}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$jhj ubj)}(hhh](j)}(hhh]h])}(hentryidh]hentryid}(hjShjQubah}(h]h]h]h]h ]uh$h\h%h&h'K_hjNubah}(h]h]h]h]h ]uh$jhjKubj)}(hhh]h])}(hbiginth]hbigint}(hjjhjhubah}(h]h]h]h]h ]uh$h\h%h&h'K_hjeubah}(h]h]h]h]h ]uh$jhjKubeh}(h]h]h]h]h ]uh$jhj ubj)}(hhh](j)}(hhh]h])}(h ip_addressh]h ip_address}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'K`hjubah}(h]h]h]h]h ]uh$jhjubj)}(hhh]h])}(hcharacter varying(512)h]hcharacter varying(512)}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'K`hjubah}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$jhj ubj)}(hhh](j)}(hhh]h])}(h user_agenth]h user_agent}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kahjubah}(h]h]h]h]h ]uh$jhjubj)}(hhh]h])}(hcharacter varying(512)h]hcharacter varying(512)}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kahjubah}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$jhj ubj)}(hhh](j)}(hhh]h])}(h principalh]h principal}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kbhjubah}(h]h]h]h]h ]uh$jhjubj)}(hhh]h])}(hcharacter varying(512)h]hcharacter varying(512)}(hjhj ubah}(h]h]h]h]h ]uh$h\h%h&h'Kbhj ubah}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$jhj ubj)}(hhh](j)}(hhh]h])}(hdocidh]hdocid}(hj/hj-ubah}(h]h]h]h]h ]uh$h\h%h&h'Kchj*ubah}(h]h]h]h]h ]uh$jhj'ubj)}(hhh]h])}(hcharacter varying(250)h]hcharacter varying(250)}(hjFhjDubah}(h]h]h]h]h ]uh$h\h%h&h'KchjAubah}(h]h]h]h]h ]uh$jhj'ubeh}(h]h]h]h]h ]uh$jhj ubj)}(hhh](j)}(hhh]h])}(heventh]hevent}(hjfhjdubah}(h]h]h]h]h ]uh$h\h%h&h'Kdhjaubah}(h]h]h]h]h ]uh$jhj^ubj)}(hhh]h])}(hcharacter varying(512)h]hcharacter varying(512)}(hj}hj{ubah}(h]h]h]h]h ]uh$h\h%h&h'Kdhjxubah}(h]h]h]h]h ]uh$jhj^ubeh}(h]h]h]h]h ]uh$jhj ubj)}(hhh](j)}(hhh]h])}(h date_loggedh]h date_logged}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kehjubah}(h]h]h]h]h ]uh$jhjubj)}(hhh]h])}(htimestamp without time zoneh]htimestamp without time zone}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kehjubah}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$jhj ubeh}(h]h]h]h]h ]uh$j hjubeh}(h]h]h]h]h ]colsKuh$jhjubah}(h]h]h]h]h ]uh$jhjhhh%h&h'Nubh])}(hXIn order to provide fast queries, aggregation and faceting of selected fields, access log information will be exported from the current ‘access_log’ table and from the ‘systemmetadata’ table into a new Solr index that will be configured in Metacat as a second Solr core. The new Solr index will be based on access events and will contain the fields shown in the following table:h]hXIn order to provide fast queries, aggregation and faceting of selected fields, access log information will be exported from the current ‘access_log’ table and from the ‘systemmetadata’ table into a new Solr index that will be configured in Metacat as a second Solr core. The new Solr index will be based on access events and will contain the fields shown in the following table:}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'Khhjhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h]h]h]h ]colwidthKuh$jhjubj)}(hhh]h}(h]h]h]h]h ]colwidthKuh$jhjubj )}(hhh](j)}(hhh](j)}(hhh]h])}(hnameh]hname}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Knhj ubah}(h]h]h]h]h ]uh$jhj ubj)}(hhh]h])}(h ddata typeh]h ddata type}(hj)hj'ubah}(h]h]h]h]h ]uh$h\h%h&h'Knhj$ubah}(h]h]h]h]h ]uh$jhj ubeh}(h]h]h]h]h ]uh$jhjubj)}(hhh](j)}(hhh]h])}(hidh]hid}(hjIhjGubah}(h]h]h]h]h ]uh$h\h%h&h'KphjDubah}(h]h]h]h]h ]uh$jhjAubj)}(hhh]h])}(hstrh]hstr}(hj`hj^ubah}(h]h]h]h]h ]uh$h\h%h&h'Kphj[ubah}(h]h]h]h]h ]uh$jhjAubeh}(h]h]h]h]h ]uh$jhjubj)}(hhh](j)}(hhh]h])}(hdatetimeh]hdatetime}(hjhj~ubah}(h]h]h]h]h ]uh$h\h%h&h'Kqhj{ubah}(h]h]h]h]h ]uh$jhjxubj)}(hhh]h])}(hdateh]hdate}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kqhjubah}(h]h]h]h]h ]uh$jhjxubeh}(h]h]h]h]h ]uh$jhjubj)}(hhh](j)}(hhh]h])}(heventh]hevent}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Krhjubah}(h]h]h]h]h ]uh$jhjubj)}(hhh]h])}(hstrh]hstr}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Krhjubah}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$jhjubj)}(hhh](j)}(hhh]h])}(hlocationh]hlocation}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kshjubah}(h]h]h]h]h ]uh$jhjubj)}(hhh]h])}(hlocationh]hlocation}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kshjubah}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$jhjubj)}(hhh](j)}(hhh]h])}(hpidh]hpid}(hj%hj#ubah}(h]h]h]h]h ]uh$h\h%h&h'Kthj ubah}(h]h]h]h]h ]uh$jhjubj)}(hhh]h])}(hstrh]hstr}(hj<hj:ubah}(h]h]h]h]h ]uh$h\h%h&h'Kthj7ubah}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$jhjubj)}(hhh](j)}(hhh]h])}(h rightsHolderh]h rightsHolder}(hj\hjZubah}(h]h]h]h]h ]uh$h\h%h&h'KuhjWubah}(h]h]h]h]h ]uh$jhjTubj)}(hhh]h])}(hstrh]hstr}(hjshjqubah}(h]h]h]h]h ]uh$h\h%h&h'Kuhjnubah}(h]h]h]h]h ]uh$jhjTubeh}(h]h]h]h]h ]uh$jhjubj)}(hhh](j)}(hhh]h])}(h principalh]h principal}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kvhjubah}(h]h]h]h]h ]uh$jhjubj)}(hhh]h])}(hstrh]hstr}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kvhjubah}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$jhjubj)}(hhh](j)}(hhh]h])}(hsizeh]hsize}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kwhjubah}(h]h]h]h]h ]uh$jhjubj)}(hhh]h])}(hinth]hint}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kwhjubah}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$jhjubj)}(hhh](j)}(hhh]h])}(hformatIdh]hformatId}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kxhjubah}(h]h]h]h]h ]uh$jhjubj)}(hhh]h])}(hstrh]hstr}(hjhjubah}(h]h]h]h]h ]uh$h\h%h&h'Kxhjubah}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$jhjubeh}(h]h]h]h]h ]uh$j hjubeh}(h]h]h]h]h ]colsKuh$jhjubah}(h]h]h]h]h ]uh$jhjhhh%h&h'Nubh])}(h5The new Solr index will contain the following fields:h]h5The new Solr index will contain the following fields:}(hjEhjChhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'K{hjhhubh literal_block)}(hX 2E3E8935-364E-4000-9357-6CE4E067D236 2014-01-01T01:01:01Z read 45.17614,-93.87341 sla.2.1 uid=williams,o=unaffiliated,dc=ecoinformatics,dc=org uid=williams,o=unaffiliated,dc=ecoinformatics,dc=org 52273 eml://ecoinformatics.org/eml-2.0.1 h]hX 2E3E8935-364E-4000-9357-6CE4E067D236 2014-01-01T01:01:01Z read 45.17614,-93.87341 sla.2.1 uid=williams,o=unaffiliated,dc=ecoinformatics,dc=org uid=williams,o=unaffiliated,dc=ecoinformatics,dc=org 52273 eml://ecoinformatics.org/eml-2.0.1 }(hhhjSubah}(h]h]h]h]h ]h"h#uh$jQh'Khjhhh%h&ubh])}(hrThe second Solr core that will contain usage statistics will require a modification to the existing solr.xml file:h]hrThe second Solr core that will contain usage statistics will require a modification to the existing solr.xml file:}(hjchjahhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'KhjhhubjR)}(hXY h]hXY }(hhhjoubah}(h]h]h]h]h ]h"h#uh$jQh'Khjhhh%h&ubh])}(hXRA Java TimerTask will run the import method that will read event records from the Metacat access_log table and combine these record data from the systemmetadata table and write this combined entry to the stats Solr index. Access_log entry types such as ‘synchronization_failed’ and ‘replication’ will be filtered out and will not be written to the Solr index. The time of the last record imported from access_log will be stored so that subsequent imports would start from the next unimported event record. If required, the data may be aggregated by time interval, such as week or month.h]hXRA Java TimerTask will run the import method that will read event records from the Metacat access_log table and combine these record data from the systemmetadata table and write this combined entry to the stats Solr index. Access_log entry types such as ‘synchronization_failed’ and ‘replication’ will be filtered out and will not be written to the Solr index. The time of the last record imported from access_log will be stored so that subsequent imports would start from the next unimported event record. If required, the data may be aggregated by time interval, such as week or month.}(hjhj}hhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'Khjhhubh])}(hXThe statistics service will be exposed as a new query engine with a DataONE URL such as:h]hXThe statistics service will be exposed as a new query engine with a DataONE URL such as:}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'KhjhhubjR)}(h1https://hostname/knb/d1/mn/v1/query/stats/h]h1https://hostname/knb/d1/mn/v1/query/stats/}(hhhjubah}(h]h]h]h]h ]h"h#uh$jQh'Khjhhh%h&ubh])}(hYQueries will be passed to the new Solr query engine using the standard Solr query syntax.h]hYQueries will be passed to the new Solr query engine using the standard Solr query syntax.}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'Khjhhubh])}(hOne new class will be added to Metacat to handle stats queries, StatsQueryService. Figure 2 shows a call trace for a statistics service query.h]hOne new class will be added to Metacat to handle stats queries, StatsQueryService. Figure 2 shows a call trace for a statistics service query.}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'Khjhhubhfigure)}(hhh](himage)}(hf.. figure:: images/stats-query-sequence-diagram.png Figure 2. Statistics query sequence diagram. h]h}(h]h]h]h]h ]uri'images/stats-query-sequence-diagram.png candidates}j0jsuh$jhjh%h&h'Kubhcaption)}(h,Figure 2. Statistics query sequence diagram.h]h,Figure 2. Statistics query sequence diagram.}(hjhjubah}(h]h]h]h]h ]uh$jh%h&h'Khjubeh}(h]id1ah]h]h]h ]uh$jh'Khjhhh%h&ubh])}(hThe StatsQuerySerivce class will transform the incoming query to Solr parameters, issue the query and returns the query result as a byte stream of text/html content.h]hThe StatsQuerySerivce class will transform the incoming query to Solr parameters, issue the query and returns the query result as a byte stream of text/html content.}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'Khjhhubeh}(h]statistics-service-solr-indexah]h]statistics service solr indexah]h ]uh$h6hh8hhh%h&h'KYubh7)}(hhh](h<)}(hStatistics Service Usageh]hStatistics Service Usage}(hj hjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h;hjhhh%h&h'Kubh])}(hfThe following sections show some of the queries that will be available through the statistics service.h]hfThe following sections show some of the queries that will be available through the statistics service.}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'Khjhhubh7)}(hhh](h<)}(h3Usage of pids provided by a specified rights holderh]h3Usage of pids provided by a specified rights holder}(hj)hj'hhh%Nh'Nubah}(h]h]h]h]h ]uh$h;hj$hhh%h&h'Kubh])}(hThe following example shows a query for download volume for pids created by rightsHolder=williams with download size statistics aggregated by pid:h]hThe following example shows a query for download volume for pids created by rightsHolder=williams with download size statistics aggregated by pid:}(hj7hj5hhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'Khj$hhubjR)}(hhttp://myd1host/knb/d1/mn/v1/query/stats/q=*:*&fq=rightsHolder:uid=williams*&fq=event:read&stats=true&stats.field=size&rows=0&stats.facet=pidh]hhttp://myd1host/knb/d1/mn/v1/query/stats/q=*:*&fq=rightsHolder:uid=williams*&fq=event:read&stats=true&stats.field=size&rows=0&stats.facet=pid}(hhhjCubah}(h]h]h]h]h ]h"h#uh$jQh'Khj$hhh%h&ubh])}(h!The following result is returned:h]h!The following result is returned:}(hjShjQhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'Khj$hhubjR)}(hX ... 30.0 1000.0 3150.0 8 0 3004500.0 393.75 502.0226944215627 1000.0 1000.0 3000.0 3 0 3000000.0 1000.0 0.0 30.0 30.0 150.0 5 0 4500.0 30.0 0.0 h]hX ... 30.0 1000.0 3150.0 8 0 3004500.0 393.75 502.0226944215627 1000.0 1000.0 3000.0 3 0 3000000.0 1000.0 0.0 30.0 30.0 150.0 5 0 4500.0 30.0 0.0 }(hhhj_ubah}(h]h]h]h]h ]h"h#uh$jQh'Khj$hhh%h&ubh])}(hUThe previous query can be constrained to a specific time by adding a time range, i.e.h]hUThe previous query can be constrained to a specific time by adding a time range, i.e.}(hjohjmhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'Khj$hhubjR)}(h<&fq=datetime:%[2013-01-01T23:59:59Z TO 2013-04-31T23:59:59Z]h]h<&fq=datetime:%[2013-01-01T23:59:59Z TO 2013-04-31T23:59:59Z]}(hhhj{ubah}(h]h]h]h]h ]h"h#uh$jQh'Khj$hhh%h&ubeh}(h]3usage-of-pids-provided-by-a-specified-rights-holderah]h]3usage of pids provided by a specified rights holderah]h ]uh$h6hjhhh%h&h'Kubh7)}(hhh](h<)}(h Data uploadsh]h Data uploads}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h;hjhhh%h&h'Kubh])}(hTThe following query shows counts of data uploads by format type by a specified user:h]hTThe following query shows counts of data uploads by format type by a specified user:}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'KhjhhubjR)}(hhttp://myd1host/knb/d1/mn/v1/query/stats/q=*:*&fq=rightsHolder:uid=williams*&fq=event:create&facet=true&facet.field=formatId&rows=0h]hhttp://myd1host/knb/d1/mn/v1/query/stats/q=*:*&fq=rightsHolder:uid=williams*&fq=event:create&facet=true&facet.field=formatId&rows=0}(hhhjubah}(h]h]h]h]h ]h"h#uh$jQh'Mhjhhh%h&ubjR)}(hX ... 2 1 0 h]hX ... 2 1 0 }(hhhjubah}(h]h]h]h]h ]h"h#uh$jQh'Mhjhhh%h&ubeh}(h] data-uploadsah]h] data uploadsah]h ]uh$h6hjhhh%h&h'Kubh7)}(hhh](h<)}(hData downloadsh]hData downloads}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h;hjhhh%h&h'Mubh])}(hYThe following query shows data download counts by a specific user for each month in 2013:h]hYThe following query shows data download counts by a specific user for each month in 2013:}(hjhjhhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'MhjhhubjR)}(hhttp://myd1host/knb/d1/mn/v1/query/stats/q=*:*&fq=principal:williams&fq=event:read&fq=formatId:BIN&facet=true&facet.field=event&facet.range=datetime&facet.range.start=2013-01-01T01:01:01Z&facet.range.end=2013-12-31T24:59:59Z&facet.range.gap=%2B1MONTHh]hhttp://myd1host/knb/d1/mn/v1/query/stats/q=*:*&fq=principal:williams&fq=event:read&fq=formatId:BIN&facet=true&facet.field=event&facet.range=datetime&facet.range.start=2013-01-01T01:01:01Z&facet.range.end=2013-12-31T24:59:59Z&facet.range.gap=%2B1MONTH}(hhhjubah}(h]h]h]h]h ]h"h#uh$jQh'Mhjhhh%h&ubjR)}(hX ... 0 0 0 0 0 2 1 0 0 0 0 0 +1MONTH 2013-01-01T01:01:01Z 2014-01-01T01:01:01Z h]hX ... 0 0 0 0 0 2 1 0 0 0 0 0 +1MONTH 2013-01-01T01:01:01Z 2014-01-01T01:01:01Z }(hhhj ubah}(h]h]h]h]h ]h"h#uh$jQh'M!hjhhh%h&ubh])}(h[The following query shows EML metadata downloads by a specific user for each month in 2013.h]h[The following query shows EML metadata downloads by a specific user for each month in 2013.}(hj hj hhh%Nh'Nubah}(h]h]h]h]h ]uh$h\h%h&h'M<hjhhubjR)}(hhttp://myd1host/knb/d1/mn/v1/query/stats/q=*:*&fq=principal:*williams*&fq=event:read&fq=formatId:*eml*&facet=true&facet.field=event&facet.range=datetime&facet.range.start=2013-01-01T01:01:01Z&facet.range.end=2013-12-31T24:59:59Z&facet.range.gap=%2B1MONTHh]hhttp://myd1host/knb/d1/mn/v1/query/stats/q=*:*&fq=principal:*williams*&fq=event:read&fq=formatId:*eml*&facet=true&facet.field=event&facet.range=datetime&facet.range.start=2013-01-01T01:01:01Z&facet.range.end=2013-12-31T24:59:59Z&facet.range.gap=%2B1MONTH}(hhhj ubah}(h]h]h]h]h ]h"h#uh$jQh'M@hjhhh%h&ubjR)}(hX ... 0 0 0 1 1 0 2 0 0 0 0 0 +1MONTH 2013-01-01T01:01:01Z 2014-01-01T01:01:01Z h]hX ... 0 0 0 1 1 0 2 0 0 0 0 0 +1MONTH 2013-01-01T01:01:01Z 2014-01-01T01:01:01Z }(hhhj+ ubah}(h]h]h]h]h ]h"h#uh$jQh'MDhjhhh%h&ubeh}(h]data-downloadsah]h]data downloadsah]h ]uh$h6hjhhh%h&h'Mubeh}(h]statistics-service-usageah]h]statistics service usageah]h ]uh$h6hh8hhh%h&h'Kubh7)}(hhh](h<)}(hUnresolved Issues/Questionsh]hUnresolved Issues/Questions}(hjN hjL hhh%Nh'Nubah}(h]h]h]h]h ]uh$h;hjI hhh%h&h'M`ubh)}(hhh]henumerated_list)}(hhh](h)}(hHHow is the location of an event determined? What do we mean by location?h]h])}(hjd h]hHHow is the location of an event determined? What do we mean by location?}(hjd hjf ubah}(h]h]h]h]h ]uh$h\h%h&h'Mbhjb ubah}(h]h]h]h]h ]uh$hhj_ ubh)}(hX?Currently Solr (3.x and 4.x) doesn’t allow faceting by date/time interval, so it isn't possible to use the stats component to calculate total download volume for a time interval over a time range, such as every month for the last 10 years. Therefor for calculated amounts, a query for each time interval is required.h]h])}(hj{ h]hXACurrently Solr (3.x and 4.x) doesn’t allow faceting by date/time interval, so it isn’t possible to use the stats component to calculate total download volume for a time interval over a time range, such as every month for the last 10 years. Therefor for calculated amounts, a query for each time interval is required.}(hj{ hj} ubah}(h]h]h]h]h ]uh$h\h%h&h'Mchjy ubah}(h]h]h]h]h ]uh$hhj_ ubh)}(hJWhere will citation info come from? Do we import this into the Solr index?h]h])}(hj h]hJWhere will citation info come from? Do we import this into the Solr index?}(hj hj ubah}(h]h]h]h]h ]uh$h\h%h&h'Mdhj ubah}(h]h]h]h]h ]uh$hhj_ ubh)}(hAre there text fields that the statistics service should include, i.e. do we want to provide statistics for queries such as "how many pids were downloaded that mention kelp?"? h]h])}(hAre there text fields that the statistics service should include, i.e. do we want to provide statistics for queries such as "how many pids were downloaded that mention kelp?"?h]hAre there text fields that the statistics service should include, i.e. do we want to provide statistics for queries such as “how many pids were downloaded that mention kelp?”?}(hj hj ubah}(h]h]h]h]h ]uh$h\h%h&h'Mehj ubah}(h]h]h]h]h ]uh$hhj_ ubeh}(h]h]h]h]h ]enumtypearabicprefixhsuffix.uh$j] hjZ ubah}(h]h]h]h]h ]uh$hhjI hhh%Nh'Nubeh}(h]unresolved-issues-questionsah]h]unresolved issues/questionsah]h ]uh$h6hh8hhh%h&h'M`ubeh}(h] metacat-usage-statistics-serviceah]h] metacat usage statistics serviceah]h ]uh$h6hhhhh%h&h'K&ubeh}(h]h]h]h]h ]sourceh&uh$hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(h;N generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingUTF-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh& _destinationN _config_files]pep_referencesN pep_base_url https://www.python.org/dev/peps/pep_file_url_templatepep-%04drfc_referencesN rfc_base_urlhttps://tools.ietf.org/html/ tab_widthKtrim_footnote_reference_spacefile_insertion_enabled raw_enabledKsyntax_highlightlong smart_quotessmartquotes_localesNcharacter_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xformembed_stylesheetcloak_email_addressesenvNgettext_compactubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j j hh|jjj<j9jjjjjjjjjF jC jjjjj> j; j j u nametypes}(j NhNjNj<NjNjNjNjNjF NjNjNj> Nj Nuh}(j h8h|hKjhj9hjj?jjjjjjjC jjj$jjj; jj jI jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startKid_startKparse_messages]transform_messages] transformerN decorationNhhub.