Äï]≠������ådocutils.nodesîådocumentîìî)Åî}î(å	rawsourceîå�îåchildrenî]î(h�åcommentîìî)Åî}î(hå¡@startuml images/stats-activity-diagram.png
  (*) --> "Initialize event log timer"
  --> "read an event_log entry"
      --> "read system metadata"
      --> "write to stats Solr index"
@endumlîh]îh�åTextîìîå¡@startuml images/stats-activity-diagram.png
  (*) --> "Initialize event log timer"
  --> "read an event_log entry"
      --> "read system metadata"
      --> "write to stats Solr index"
@endumlîÖîÅî}î(hhåparentîhubaå
attributesî}î(åidsî]îåclassesî]îånamesî]îådupnamesî]îåbackrefsî]îå	xml:spaceîåpreserveîuåtagnameîh	hhhhåsourceîåd/var/lib/jenkins/jobs/metacat_beta/workspace/metacat/docs/user/metacat/source/statistics-service.rstîålineîK	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
@endumlîh]î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$ubh�åsectionîìî)Åî}î(hhh]î(h�åtitleîìî)Åî}î(hå Metacat Usage Statistics Serviceîh]îhå Metacat Usage Statistics ServiceîÖîÅî}î(hh?hh=hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hh8hhh%h&h'K&ubh7)Åî}î(hhh]î(h<)Åî}î(håOverviewîh]îhåOverviewîÖîÅî}î(hhPhhNhhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hhKhhh%h&h'K)ubh�å	paragraphîìî)Åî}î(håHThis document describes a proposed usage statistics service for Metacat.îh]îhåHThis 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])Åî}î(håiThis new service will provide Metacat usage information to clients about data and metacata access events.îh]îhåiThis 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]îåoverviewîah]îh]îåoverviewîah]îh ]îuh$h6hh8hhh%h&h'K)ubh7)Åî}î(hhh]î(h<)Åî}î(håRequirementsîh]îhåRequirementsîÖîÅî}î(hháhhÖhhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hhÇhhh%h&h'K0ubh])Åî}î(håÇThe statistics service should have an easy to learn API that allows for query fields to be added
and provide reports in XML, JSON.îh]îhåÇThe statistics service should have an easy to learn API that allows for query fields to be added
and provide reports in XML, JSON.îÖîÅî}î(hhïhhìhhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K2hhÇhhubh7)Åî}î(hhh]î(h<)Åî}î(håProvided Statisticsîh]îhåProvided StatisticsîÖîÅî}î(hh¶hh§hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hh°hhh%h&h'K6ubh])Åî}î(hå2The service will include the following statistics:îh]îhå2The service will include the following statistics:îÖîÅî}î(hh¥hh≤hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K8hh°hhubh�åblock_quoteîìî)Åî}î(hhh]îh�åbullet_listîìî)Åî}î(hhh]î(h�å	list_itemîìî)Åî}î(hå
Dataset viewsîh]îh])Åî}î(hhŒh]îhå
Dataset viewsîÖîÅî}î(hhŒhh–ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K:hhÃubah}î(h]îh]îh]îh]îh ]îuh$h hh«ubhÀ)Åî}î(håPackage downloadsîh]îh])Åî}î(hhÂh]îhåPackage downloadsîÖîÅî}î(hhÂhhÁubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K;hh„ubah}î(h]îh]îh]îh]îh ]îuh$h hh«ubhÀ)Åî}î(hå"Size in bytes of package downloadsîh]îh])Åî}î(hh¸h]îhå"Size in bytes of package downloadsîÖîÅî}î(hh¸hh˛ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K<hh˙ubah}î(h]îh]îh]îh]îh ]îuh$h hh«ubhÀ)Åî}î(hå
Citations
îh]îh])Åî}î(hå	Citationsîh]îhå	CitationsîÖîÅî}î(hj��hj��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K=hj��ubah}î(h]îh]îh]îh]îh ]îuh$h hh«ubeh}î(h]îh]îh]îh]îh ]îåbulletîå*îuh$h≈h%h&h'K:hh¬ubah}î(h]îh]îh]îh]îh ]îuh$h¿hh°hhh%Nh'Nubeh}î(h]îåprovided-statisticsîah]îh]îåprovided statisticsîah]îh ]îuh$h6hhÇhhh%h&h'K6ubh7)Åî}î(hhh]î(h<)Åî}î(håResults Filteringîh]îhåResults FilteringîÖîÅî}î(hjD��hjB��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hj?��hhh%h&h'K@ubh])Åî}î(håTReports returned by the service must be able to be filtered by the following fields:îh]îhåTReports returned by the service must be able to be filtered by the following fields:îÖîÅî}î(hjR��hjP��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KBhj?��hhubh¡)Åî}î(hhh]îh∆)Åî}î(hhh]î(hÀ)Åî}î(håA PID or list of PIDsîh]îh])Åî}î(hjf��h]îhåA PID or list of PIDsîÖîÅî}î(hjf��hjh��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KDhjd��ubah}î(h]îh]îh]îh]îh ]îuh$h hja��ubhÀ)Åî}î(håNCreator or list of creators (DN, or ORCID, or some amalgam -- to be discussed)îh]îh])Åî}î(hj}��h]îhåOCreator or list of creators (DN, or ORCID, or some amalgam ‚Äì to be discussed)îÖîÅî}î(hj}��hj��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KEhj{��ubah}î(h]îh]îh]îh]îh ]îuh$h hja��ubhÀ)Åî}î(hå5A time range of access event (upload, download, etc.)îh]îh])Åî}î(hjî��h]îhå5A time range of access event (upload, download, etc.)îÖîÅî}î(hjî��hjñ��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KFhjí��ubah}î(h]îh]îh]îh]îh ]îuh$h hja��ubhÀ)Åî}î(hå9Spatial location of access event (upload, download, etc.)îh]îh])Åî}î(hj´��h]îhå9Spatial location of access event (upload, download, etc.)îÖîÅî}î(hj´��hj≠��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KGhj©��ubah}î(h]îh]îh]îh]îh ]îuh$h hja��ubhÀ)Åî}î(hå
IP Addressîh]îh])Åî}î(hj¬��h]îhå
IP AddressîÖîÅî}î(hj¬��hjƒ��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KHhj¿��ubah}î(h]îh]îh]îh]îh ]îuh$h hja��ubhÀ)Åî}î(hå\Accessor or list of accessors (DN, or ORCID, or some amalgam, needs ACL -- to be discussed)
îh]îh])Åî}î(hå[Accessor or list of accessors (DN, or ORCID, or some amalgam, needs ACL -- to be discussed)îh]îhå\Accessor or list of accessors (DN, or ORCID, or some amalgam, needs ACL ‚Äì to be discussed)îÖîÅî}î(hj›��hj€��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KIhj◊��ubah}î(h]îh]îh]îh]îh ]îuh$h hja��ubeh}î(h]îh]îh]îh]îh ]îj/��j0��uh$h≈h%h&h'KDhj^��ubah}î(h]îh]îh]îh]îh ]îuh$h¿hj?��hhh%Nh'Nubeh}î(h]îåresults-filteringîah]îh]îåresults filteringîah]îh ]îuh$h6hhÇhhh%h&h'K@ubh7)Åî}î(hhh]î(h<)Åî}î(håResults Aggregationîh]îhåResults AggregationîÖîÅî}î(hj��hj��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hj��hhh%h&h'KLubh�ådefinition_listîìî)Åî}î(hhh]îh�ådefinition_list_itemîìî)Åî}î(håŸReports must be able to be aggregated by the following fields:
* User (DN, or ORCID, or some amalgam )
* Time range, aggregated to requested unit (day, week, month, year)
* Spatial range, aggregated to requested unit
îh]î(h�återmîìî)Åî}î(hå>Reports 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$j��h%h&h'KQhj��ubh�å
definitionîìî)Åî}î(hhh]îh∆)Åî}î(hhh]î(hÀ)Åî}î(hå%User (DN, or ORCID, or some amalgam )îh]îh])Åî}î(hj9��h]îhå%User (DN, or ORCID, or some amalgam )îÖîÅî}î(hj9��hj;��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KOhj7��ubah}î(h]îh]îh]îh]îh ]îuh$h hj4��ubhÀ)Åî}î(håATime range, aggregated to requested unit (day, week, month, year)îh]îh])Åî}î(hjP��h]îhåATime range, aggregated to requested unit (day, week, month, year)îÖîÅî}î(hjP��hjR��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KPhjN��ubah}î(h]îh]îh]îh]îh ]îuh$h hj4��ubhÀ)Åî}î(hå,Spatial range, aggregated to requested unit
îh]îh])Åî}î(hå+Spatial range, aggregated to requested unitîh]îhå+Spatial range, aggregated to requested unitîÖîÅî}î(hjk��hji��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KQhje��ubah}î(h]îh]îh]îh]îh ]îuh$h hj4��ubeh}î(h]îh]îh]îh]îh ]îj/��j0��uh$h≈h%h&h'KOhj1��ubah}î(h]îh]îh]îh]îh ]îuh$j/��hj��ubeh}î(h]îh]îh]îh]îh ]îuh$j��h%h&h'KQhj��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj��hhh%Nh'Nubeh}î(h]îåresults-aggregationîah]îh]îåresults aggregationîah]îh ]îuh$h6hhÇhhh%h&h'KLubh7)Åî}î(hhh]î(h<)Åî}î(håPerformanceîh]îhåPerformanceîÖîÅî}î(hj¢��hj†��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hjù��hhh%h&h'KTubh])Åî}î(håÑThe query service should provide results quickly, as it will be used to construct the user dashboard and possibly other UI elements.îh]îhåÑThe query service should provide results quickly, as it will be used to construct the user dashboard and possibly other UI elements.îÖîÅî}î(hj∞��hjÆ��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KVhjù��hhubeh}î(h]îåperformanceîah]îh]îåperformanceîah]îh ]îuh$h6hhÇhhh%h&h'KTubeh}î(h]îårequirementsîah]îh]îårequirementsîah]îh ]îuh$h6hh8hhh%h&h'K0ubh7)Åî}î(hhh]î(h<)Åî}î(håStatistics Service Solr Indexîh]îhåStatistics Service Solr IndexîÖîÅî}î(hj—��hjœ��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hjÃ��hhh%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:îÖîÅî}î(hjfl��hj›��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KZhjÃ��hhubh�åtableîìî)Åî}î(hhh]îh�åtgroupîìî)Åî}î(hhh]î(h�åcolspecîìî)Åî}î(hhh]îh}î(h]îh]îh]îh]îh ]îåcolwidthîKuh$jı��hjÚ��ubjˆ��)Åî}î(hhh]îh}î(h]îh]îh]îh]îh ]îåcolwidthîKuh$jı��hjÚ��ubh�åtbodyîìî)Åî}î(hhh]î(h�årowîìî)Åî}î(hhh]î(h�åentryîìî)Åî}î(hhh]îh])Åî}î(hånameîh]îhånameîÖîÅî}î(hj��hj��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K]hj��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]îh])Åî}î(hå	data typeîh]îhå	data typeîÖîÅî}î(hj3��hj1��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K]hj.��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj
��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(håentryidîh]îhåentryidîÖîÅî}î(hjS��hjQ��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K_hjN��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjK��ubj��)Åî}î(hhh]îh])Åî}î(håbigintîh]îhåbigintîÖîÅî}î(hjj��hjh��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K_hje��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjK��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj
��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(hå
ip_addressîh]îhå
ip_addressîÖîÅî}î(hjä��hjà��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K`hjÖ��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjÇ��ubj��)Åî}î(hhh]îh])Åî}î(håcharacter varying(512)îh]îhåcharacter varying(512)îÖîÅî}î(hj°��hjü��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K`hjú��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjÇ��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj
��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(hå
user_agentîh]îhå
user_agentîÖîÅî}î(hj¡��hjø��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kahjº��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjπ��ubj��)Åî}î(hhh]îh])Åî}î(håcharacter varying(512)îh]îhåcharacter varying(512)îÖîÅî}î(hjÿ��hj÷��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kahj”��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjπ��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj
��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(hå	principalîh]îhå	principalîÖîÅî}î(hj¯��hjˆ��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KbhjÛ��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]îh])Åî}î(håcharacter varying(512)îh]îhåcharacter varying(512)îÖîÅî}î(hj��hj
��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kbhj
��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj
��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(hådocidîh]îhådocidîÖîÅî}î(hj/��hj-��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kchj*��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj'��ubj��)Åî}î(hhh]îh])Åî}î(håcharacter varying(250)îh]îhåcharacter varying(250)îÖîÅî}î(hjF��hjD��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KchjA��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj'��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj
��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(håeventîh]îhåeventîÖîÅî}î(hjf��hjd��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kdhja��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj^��ubj��)Åî}î(hhh]îh])Åî}î(håcharacter varying(512)îh]îhåcharacter varying(512)îÖîÅî}î(hj}��hj{��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kdhjx��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj^��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj
��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(hådate_loggedîh]îhådate_loggedîÖîÅî}î(hjù��hjõ��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kehjò��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjï��ubj��)Åî}î(hhh]îh])Åî}î(håtimestamp without time zoneîh]îhåtimestamp without time zoneîÖîÅî}î(hj¥��hj≤��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KehjØ��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjï��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj
��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hjÚ��ubeh}î(h]îh]îh]îh]îh ]îåcolsîKuh$j��hjÌ��ubah}î(h]îh]îh]îh]îh ]îuh$jÎ��hjÃ��hhh%h&h'Nubh])Åî}î(hXÇ��In 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]îhXÇ��In 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:îÖîÅî}î(hj·��hjfl��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KhhjÃ��hhubjÏ��)Åî}î(hhh]îjÒ��)Åî}î(hhh]î(jˆ��)Åî}î(hhh]îh}î(h]îh]îh]îh]îh ]îåcolwidthîKuh$jı��hj��ubjˆ��)Åî}î(hhh]îh}î(h]îh]îh]îh]îh ]îåcolwidthîKuh$jı��hj��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(hånameîh]îhånameîÖîÅî}î(hj��hj��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Knhj
��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj
��ubj��)Åî}î(hhh]îh])Åî}î(hå
ddata typeîh]îhå
ddata typeîÖîÅî}î(hj)��hj'��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Knhj$��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj
��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(håidîh]îhåidîÖîÅî}î(hjI��hjG��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KphjD��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjA��ubj��)Åî}î(hhh]îh])Åî}î(håstrîh]îhåstrîÖîÅî}î(hj`��hj^��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kphj[��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjA��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(hådatetimeîh]îhådatetimeîÖîÅî}î(hjÄ��hj~��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kqhj{��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjx��ubj��)Åî}î(hhh]îh])Åî}î(hådateîh]îhådateîÖîÅî}î(hjó��hjï��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kqhjí��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjx��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(håeventîh]îhåeventîÖîÅî}î(hj∑��hjµ��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Krhj≤��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjØ��ubj��)Åî}î(hhh]îh])Åî}î(håstrîh]îhåstrîÖîÅî}î(hjŒ��hjÃ��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Krhj…��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjØ��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(hålocationîh]îhålocationîÖîÅî}î(hjÓ��hjÏ��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KshjÈ��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjÊ��ubj��)Åî}î(hhh]îh])Åî}î(hålocationîh]îhålocationîÖîÅî}î(hj��hj��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kshj���ubah}î(h]îh]îh]îh]îh ]îuh$j��hjÊ��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(håpidîh]îhåpidîÖîÅî}î(hj%��hj#��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kthj ��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]îh])Åî}î(håstrîh]îhåstrîÖîÅî}î(hj<��hj:��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kthj7��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(hårightsHolderîh]îhårightsHolderîÖîÅî}î(hj\��hjZ��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KuhjW��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjT��ubj��)Åî}î(hhh]îh])Åî}î(håstrîh]îhåstrîÖîÅî}î(hjs��hjq��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kuhjn��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjT��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(hå	principalîh]îhå	principalîÖîÅî}î(hjì��hjë��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kvhjé��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjã��ubj��)Åî}î(hhh]îh])Åî}î(håstrîh]îhåstrîÖîÅî}î(hj™��hj®��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kvhj•��ubah}î(h]îh]îh]îh]îh ]îuh$j��hjã��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(håsizeîh]îhåsizeîÖîÅî}î(hj ��hj»��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kwhj≈��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj¬��ubj��)Åî}î(hhh]îh])Åî}î(håintîh]îhåintîÖîÅî}î(hj·��hjfl��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kwhj‹��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj¬��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj��ubj��)Åî}î(hhh]î(j��)Åî}î(hhh]îh])Åî}î(håformatIdîh]îhåformatIdîÖîÅî}î(hj��hjˇ��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kxhj¸��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj˘��ubj��)Åî}î(hhh]îh])Åî}î(håstrîh]îhåstrîÖîÅî}î(hj��hj��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Kxhj��ubah}î(h]îh]îh]îh]îh ]îuh$j��hj˘��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj��ubeh}î(h]îh]îh]îh]îh ]îuh$j��hj��ubeh}î(h]îh]îh]îh]îh ]îåcolsîKuh$j��hjÌ��ubah}î(h]îh]îh]îh]îh ]îuh$jÎ��hjÃ��hhh%h&h'Nubh])Åî}î(hå5The new Solr index will contain the following fields:îh]îhå5The new Solr index will contain the following fields:îÖîÅî}î(hjE��hjC��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K{hjÃ��hhubh�å
literal_blockîìî)Åî}î(hXÛ��<doc>
<str name="id">2E3E8935-364E-4000-9357-6CE4E067D236</str>
<date name="datetime">2014-01-01T01:01:01Z</date>
<str name="event">read</str>
<location name="location">45.17614,-93.87341</location>
<str name="pid">sla.2.1</str>
<str name=”rightsHolder”>uid=williams,o=unaffiliated,dc=ecoinformatics,dc=org</str>
<str name="principal">uid=williams,o=unaffiliated,dc=ecoinformatics,dc=org</str>
<int name="size">52273</int>
<str name=”formatId”>eml://ecoinformatics.org/eml-2.0.1</str>
</doc>îh]îhXÛ��<doc>
<str name="id">2E3E8935-364E-4000-9357-6CE4E067D236</str>
<date name="datetime">2014-01-01T01:01:01Z</date>
<str name="event">read</str>
<location name="location">45.17614,-93.87341</location>
<str name="pid">sla.2.1</str>
<str name=”rightsHolder”>uid=williams,o=unaffiliated,dc=ecoinformatics,dc=org</str>
<str name="principal">uid=williams,o=unaffiliated,dc=ecoinformatics,dc=org</str>
<int name="size">52273</int>
<str name=”formatId”>eml://ecoinformatics.org/eml-2.0.1</str>
</doc>îÖîÅî}î(hhhjS��ubah}î(h]îh]îh]îh]îh ]îh"h#uh$jQ��h'KhjÃ��hhh%h&ubh])Åî}î(hårThe second Solr core that will contain usage statistics will require a modification to the existing solr.xml file:îh]îhårThe second Solr core that will contain usage statistics will require a modification to the existing solr.xml file:îÖîÅî}î(hjc��hja��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KãhjÃ��hhubjR��)Åî}î(hXY��<solr persistent="false">
  <!--
  adminPath: RequestHandler path to manage cores.
    If 'null' (or absent), cores will not be manageable via request handler
  -->
  <cores adminPath="/admin/cores" defaultCoreName="collection1">
    <core name="collection1" instanceDir="." />
    <core name=”stats” instanceDir=”.”/>
  </cores>
</solr>îh]îhXY��<solr persistent="false">
  <!--
  adminPath: RequestHandler path to manage cores.
    If 'null' (or absent), cores will not be manageable via request handler
  -->
  <cores adminPath="/admin/cores" defaultCoreName="collection1">
    <core name="collection1" instanceDir="." />
    <core name=”stats” instanceDir=”.”/>
  </cores>
</solr>îÖîÅî}î(hhhjo��ubah}î(h]îh]îh]îh]îh ]îh"h#uh$jQ��h'KèhjÃ��hhh%h&ubh])Åî}î(hXR��A 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]îhXR��A 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.îÖîÅî}î(hj��hj}��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KöhjÃ��hhubh])Åî}î(håXThe statistics service will be exposed as a new query engine with a DataONE URL such as:îh]îhåXThe statistics service will be exposed as a new query engine with a DataONE URL such as:îÖîÅî}î(hjç��hjã��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K¢hjÃ��hhubjR��)Åî}î(hå1https://hostname/knb/d1/mn/v1/query/stats/<query>îh]îhå1https://hostname/knb/d1/mn/v1/query/stats/<query>îÖîÅî}î(hhhjô��ubah}î(h]îh]îh]îh]îh ]îh"h#uh$jQ��h'K¶hjÃ��hhh%h&ubh])Åî}î(håYQueries will be passed to the new Solr query engine using the standard Solr query syntax.îh]îhåYQueries will be passed to the new Solr query engine using the standard Solr query syntax.îÖîÅî}î(hj©��hjß��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K®hjÃ��hhubh])Åî}î(håéOne new class will be added to Metacat to handle stats queries, StatsQueryService. Figure 2 shows a call trace for a statistics
service query.îh]îhåéOne new class will be added to Metacat to handle stats queries, StatsQueryService. Figure 2 shows a call trace for a statistics
service query.îÖîÅî}î(hj∑��hjµ��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K´hjÃ��hhubh�åfigureîìî)Åî}î(hhh]î(h�åimageîìî)Åî}î(håf.. 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î}îj0��j’��suh$j»��hj≈��h%h&h'K∞ubh�åcaptionîìî)Åî}î(hå,Figure 2. Statistics query sequence diagram.îh]îhå,Figure 2. Statistics query sequence diagram.îÖîÅî}î(hj‹��hj⁄��ubah}î(h]îh]îh]îh]îh ]îuh$jÿ��h%h&h'K∞hj≈��ubeh}î(h]îåid1îah]îh]îh]îh ]îuh$j√��h'K∞hjÃ��hhh%h&ubh])Åî}î(hå•The 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]îhå•The 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.îÖîÅî}î(hjÒ��hjÔ��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K≥hjÃ��hhubeh}î(h]îåstatistics-service-solr-indexîah]îh]îåstatistics service solr indexîah]îh ]îuh$h6hh8hhh%h&h'KYubh7)Åî}î(hhh]î(h<)Åî}î(håStatistics Service Usageîh]îhåStatistics Service UsageîÖîÅî}î(hj
��hj��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hj��hhh%h&h'K∂ubh])Åî}î(håfThe following sections show some of the queries that will be available through the statistics service.îh]îhåfThe following sections show some of the queries that will be available through the statistics service.îÖîÅî}î(hj��hj��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K∏hj��hhubh7)Åî}î(hhh]î(h<)Åî}î(hå3Usage of pids provided by a specified rights holderîh]îhå3Usage of pids provided by a specified rights holderîÖîÅî}î(hj)��hj'��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hj$��hhh%h&h'Kªubh])Åî}î(håíThe following example shows a query for download volume for pids created by rightsHolder=williams with download size statistics aggregated by pid:îh]îhåíThe following example shows a query for download volume for pids created by rightsHolder=williams with download size statistics aggregated by pid:îÖîÅî}î(hj7��hj5��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KΩhj$��hhubjR��)Åî}î(håçhttp://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îh]îhåçhttp://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îÖîÅî}î(hhhjC��ubah}î(h]îh]îh]îh]îh ]îh"h#uh$jQ��h'K¡hj$��hhh%h&ubh])Åî}î(hå!The following result is returned:îh]îhå!The following result is returned:îÖîÅî}î(hjS��hjQ��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K√hj$��hhubjR��)Åî}î(hX��<?xml version="1.0" encoding="UTF-8"?>
<response>
  ...
  <result name="response" numFound="8" start="0"/>
  <lst name="stats">
    <lst name="stats_fields">
      <lst name="size">
        <double name="min">30.0</double>
        <double name="max">1000.0</double>
        <double name="sum">3150.0</double>
        <long name="count">8</long>
        <long name="missing">0</long>
        <double name="sumOfSquares">3004500.0</double>
        <double name="mean">393.75</double>
        <double name="stddev">502.0226944215627</double>
        <lst name="facets">
          <lst name="pid">
            <lst name="sla.3.1">
              <double name="min">1000.0</double>
              <double name="max">1000.0</double>
              <double name="sum">3000.0</double>
              <long name="count">3</long>
              <long name="missing">0</long>
              <double name="sumOfSquares">3000000.0</double>
              <double name="mean">1000.0</double>
              <double name="stddev">0.0</double>
            </lst>
            <lst name="sla.2.1">
              <double name="min">30.0</double>
              <double name="max">30.0</double>
              <double name="sum">150.0</double>
              <long name="count">5</long>
              <long name="missing">0</long>
              <double name="sumOfSquares">4500.0</double>
              <double name="mean">30.0</double>
              <double name="stddev">0.0</double>
            </lst>
          </lst>
        </lst>
      </lst>
    </lst>
  </lst>
</response>îh]îhX��<?xml version="1.0" encoding="UTF-8"?>
<response>
  ...
  <result name="response" numFound="8" start="0"/>
  <lst name="stats">
    <lst name="stats_fields">
      <lst name="size">
        <double name="min">30.0</double>
        <double name="max">1000.0</double>
        <double name="sum">3150.0</double>
        <long name="count">8</long>
        <long name="missing">0</long>
        <double name="sumOfSquares">3004500.0</double>
        <double name="mean">393.75</double>
        <double name="stddev">502.0226944215627</double>
        <lst name="facets">
          <lst name="pid">
            <lst name="sla.3.1">
              <double name="min">1000.0</double>
              <double name="max">1000.0</double>
              <double name="sum">3000.0</double>
              <long name="count">3</long>
              <long name="missing">0</long>
              <double name="sumOfSquares">3000000.0</double>
              <double name="mean">1000.0</double>
              <double name="stddev">0.0</double>
            </lst>
            <lst name="sla.2.1">
              <double name="min">30.0</double>
              <double name="max">30.0</double>
              <double name="sum">150.0</double>
              <long name="count">5</long>
              <long name="missing">0</long>
              <double name="sumOfSquares">4500.0</double>
              <double name="mean">30.0</double>
              <double name="stddev">0.0</double>
            </lst>
          </lst>
        </lst>
      </lst>
    </lst>
  </lst>
</response>îÖîÅî}î(hhhj_��ubah}î(h]îh]îh]îh]îh ]îh"h#uh$jQ��h'K«hj$��hhh%h&ubh])Åî}î(håUThe previous query can be constrained to a specific time by adding a time range, i.e.îh]îhåUThe previous query can be constrained to a specific time by adding a time range, i.e.îÖîÅî}î(hjo��hjm��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'KÛhj$��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$jQ��h'K˜hj$��hhh%h&ubeh}î(h]îå3usage-of-pids-provided-by-a-specified-rights-holderîah]îh]îå3usage of pids provided by a specified rights holderîah]îh ]îuh$h6hj��hhh%h&h'Kªubh7)Åî}î(hhh]î(h<)Åî}î(håData uploadsîh]îhåData uploadsîÖîÅî}î(hjñ��hjî��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hjë��hhh%h&h'K˙ubh])Åî}î(håTThe following query shows counts of data uploads by format type by a specified user:îh]îhåTThe following query shows counts of data uploads by format type by a specified user:îÖîÅî}î(hj§��hj¢��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'K¸hjë��hhubjR��)Åî}î(håÉhttp://myd1host/knb/d1/mn/v1/query/stats/q=*:*&fq=rightsHolder:uid=williams*&fq=event:create&facet=true&facet.field=formatId&rows=0îh]îhåÉhttp://myd1host/knb/d1/mn/v1/query/stats/q=*:*&fq=rightsHolder:uid=williams*&fq=event:create&facet=true&facet.field=formatId&rows=0îÖîÅî}î(hhhj∞��ubah}î(h]îh]îh]îh]îh ]îh"h#uh$jQ��h'M�hjë��hhh%h&ubjR��)Åî}î(hXŒ��<?xml version="1.0" encoding="UTF-8"?>
<response>
  ...
  <result name="response" numFound="3" start="0"/>
  <lst name="facet_counts">
    <lst name="facet_queries"/>
    <lst name="facet_fields">
      <lst name="formatId">
        <int name="BIN">2</int>
        <int name="eml://ecoinformatics.org/eml-2.1.1">1</int>
        <int name="text/csv">0</int>
      </lst>
    </lst>
    <lst name="facet_dates"/>
    <lst name="facet_ranges"/>
  </lst>
</response>îh]îhXŒ��<?xml version="1.0" encoding="UTF-8"?>
<response>
  ...
  <result name="response" numFound="3" start="0"/>
  <lst name="facet_counts">
    <lst name="facet_queries"/>
    <lst name="facet_fields">
      <lst name="formatId">
        <int name="BIN">2</int>
        <int name="eml://ecoinformatics.org/eml-2.1.1">1</int>
        <int name="text/csv">0</int>
      </lst>
    </lst>
    <lst name="facet_dates"/>
    <lst name="facet_ranges"/>
  </lst>
</response>îÖîÅî}î(hhhjæ��ubah}î(h]îh]îh]îh]îh ]îh"h#uh$jQ��h'Mhjë��hhh%h&ubeh}î(h]îådata-uploadsîah]îh]îådata uploadsîah]îh ]îuh$h6hj��hhh%h&h'K˙ubh7)Åî}î(hhh]î(h<)Åî}î(håData downloadsîh]îhåData downloadsîÖîÅî}î(hjŸ��hj◊��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hj‘��hhh%h&h'Mubh])Åî}î(håYThe following query shows data download counts by a specific user for each month in 2013:îh]îhåYThe following query shows data download counts by a specific user for each month in 2013:îÖîÅî}î(hjÁ��hjÂ��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Mhj‘��hhubjR��)Åî}î(hå˙http://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îh]îhå˙http://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îÖîÅî}î(hhhjÛ��ubah}î(h]îh]îh]îh]îh ]îh"h#uh$jQ��h'Mhj‘��hhh%h&ubjR��)Åî}î(hX¡��<?xml version="1.0" encoding="UTF-8"?>
<response>
    ...
    <lst name="facet_ranges">
      <lst name="datetime">
        <lst name="counts">
          <int name="2013-01-01T01:01:01Z">0</int>
          <int name="2013-02-01T01:01:01Z">0</int>
          <int name="2013-03-01T01:01:01Z">0</int>
          <int name="2013-04-01T01:01:01Z">0</int>
          <int name="2013-05-01T01:01:01Z">0</int>
          <int name="2013-06-01T01:01:01Z">2</int>
          <int name="2013-07-01T01:01:01Z">1</int>
          <int name="2013-08-01T01:01:01Z">0</int>
          <int name="2013-09-01T01:01:01Z">0</int>
          <int name="2013-10-01T01:01:01Z">0</int>
          <int name="2013-11-01T01:01:01Z">0</int>
          <int name="2013-12-01T01:01:01Z">0</int>
        </lst>
        <str name="gap">+1MONTH</str>
        <date name="start">2013-01-01T01:01:01Z</date>
        <date name="end">2014-01-01T01:01:01Z</date>
      </lst>
    </lst>
  </lst>
</response>îh]îhX¡��<?xml version="1.0" encoding="UTF-8"?>
<response>
    ...
    <lst name="facet_ranges">
      <lst name="datetime">
        <lst name="counts">
          <int name="2013-01-01T01:01:01Z">0</int>
          <int name="2013-02-01T01:01:01Z">0</int>
          <int name="2013-03-01T01:01:01Z">0</int>
          <int name="2013-04-01T01:01:01Z">0</int>
          <int name="2013-05-01T01:01:01Z">0</int>
          <int name="2013-06-01T01:01:01Z">2</int>
          <int name="2013-07-01T01:01:01Z">1</int>
          <int name="2013-08-01T01:01:01Z">0</int>
          <int name="2013-09-01T01:01:01Z">0</int>
          <int name="2013-10-01T01:01:01Z">0</int>
          <int name="2013-11-01T01:01:01Z">0</int>
          <int name="2013-12-01T01:01:01Z">0</int>
        </lst>
        <str name="gap">+1MONTH</str>
        <date name="start">2013-01-01T01:01:01Z</date>
        <date name="end">2014-01-01T01:01:01Z</date>
      </lst>
    </lst>
  </lst>
</response>îÖîÅî}î(hhhj	��ubah}î(h]îh]îh]îh]îh ]îh"h#uh$jQ��h'M!hj‘��hhh%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<hj‘��hhubjR��)Åî}î(hå˛http://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îh]îhå˛http://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$jQ��h'M@hj‘��hhh%h&ubjR��)Åî}î(hX≈��<?xml version="1.0" encoding="UTF-8"?>
<response>
        ...
    <lst name="facet_ranges">
      <lst name="datetime">
        <lst name="counts">
          <int name="2013-01-01T01:01:01Z">0</int>
          <int name="2013-02-01T01:01:01Z">0</int>
          <int name="2013-03-01T01:01:01Z">0</int>
          <int name="2013-04-01T01:01:01Z">1</int>
          <int name="2013-05-01T01:01:01Z">1</int>
          <int name="2013-06-01T01:01:01Z">0</int>
          <int name="2013-07-01T01:01:01Z">2</int>
          <int name="2013-08-01T01:01:01Z">0</int>
          <int name="2013-09-01T01:01:01Z">0</int>
          <int name="2013-10-01T01:01:01Z">0</int>
          <int name="2013-11-01T01:01:01Z">0</int>
          <int name="2013-12-01T01:01:01Z">0</int>
        </lst>
        <str name="gap">+1MONTH</str>
        <date name="start">2013-01-01T01:01:01Z</date>
        <date name="end">2014-01-01T01:01:01Z</date>
      </lst>
    </lst>
  </lst>
</response>îh]îhX≈��<?xml version="1.0" encoding="UTF-8"?>
<response>
        ...
    <lst name="facet_ranges">
      <lst name="datetime">
        <lst name="counts">
          <int name="2013-01-01T01:01:01Z">0</int>
          <int name="2013-02-01T01:01:01Z">0</int>
          <int name="2013-03-01T01:01:01Z">0</int>
          <int name="2013-04-01T01:01:01Z">1</int>
          <int name="2013-05-01T01:01:01Z">1</int>
          <int name="2013-06-01T01:01:01Z">0</int>
          <int name="2013-07-01T01:01:01Z">2</int>
          <int name="2013-08-01T01:01:01Z">0</int>
          <int name="2013-09-01T01:01:01Z">0</int>
          <int name="2013-10-01T01:01:01Z">0</int>
          <int name="2013-11-01T01:01:01Z">0</int>
          <int name="2013-12-01T01:01:01Z">0</int>
        </lst>
        <str name="gap">+1MONTH</str>
        <date name="start">2013-01-01T01:01:01Z</date>
        <date name="end">2014-01-01T01:01:01Z</date>
      </lst>
    </lst>
  </lst>
</response>îÖîÅî}î(hhhj+	��ubah}î(h]îh]îh]îh]îh ]îh"h#uh$jQ��h'MDhj‘��hhh%h&ubeh}î(h]îådata-downloadsîah]îh]îådata downloadsîah]îh ]îuh$h6hj��hhh%h&h'Mubeh}î(h]îåstatistics-service-usageîah]îh]îåstatistics service usageîah]îh ]îuh$h6hh8hhh%h&h'K∂ubh7)Åî}î(hhh]î(h<)Åî}î(håUnresolved Issues/Questionsîh]îhåUnresolved Issues/QuestionsîÖîÅî}î(hjN	��hjL	��hhh%Nh'Nubah}î(h]îh]îh]îh]îh ]îuh$h;hjI	��hhh%h&h'M`ubh¡)Åî}î(hhh]îh�åenumerated_listîìî)Åî}î(hhh]î(hÀ)Åî}î(håHHow is the location of an event determined? What do we mean by location?îh]îh])Åî}î(hjd	��h]îhåHHow 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$h hj_	��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]îhXA��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.îÖîÅî}î(hj{	��hj}	��ubah}î(h]îh]îh]îh]îh ]îuh$h\h%h&h'Mchjy	��ubah}î(h]îh]îh]îh]îh ]îuh$h hj_	��ubhÀ)Åî}î(håJWhere will citation info come from? Do we import this into the Solr index?îh]îh])Åî}î(hjí	��h]îhåJWhere 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$h hj_	��ubhÀ)Åî}î(hå≥Are 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])Åî}î(håØAre 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å≥Are 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$h hj_	��ubeh}î(h]îh]îh]îh]îh ]îåenumtypeîåarabicîåprefixîhåsuffixîå.îuh$j]	��hjZ	��ubah}î(h]îh]îh]îh]îh ]îuh$h¿hjI	��hhh%Nh'Nubeh}î(h]îåunresolved-issues-questionsîah]îh]îåunresolved issues/questionsîah]îh ]îuh$h6hh8hhh%h&h'M`ubeh}î(h]îå metacat-usage-statistics-serviceîah]îh]îå metacat usage statistics serviceîah]îh ]îuh$h6hhhhh%h&h'K&ubeh}î(h]îh]îh]îh]îh ]îåsourceîh&uh$håcurrent_sourceîNåcurrent_lineîNåsettingsîådocutils.frontendîåValuesîìî)Åî}î(h;Nå	generatorîNå	datestampîNåsource_linkîNå
source_urlîNå
toc_backlinksîj��åfootnote_backlinksîKå
sectnum_xformîKåstrip_commentsîNåstrip_elements_with_classesîNå
strip_classesîNåreport_levelîKå
halt_levelîKåexit_status_levelîKådebugîNåwarning_streamîNå	tracebackîàåinput_encodingîå	utf-8-sigîåinput_encoding_error_handlerîåstrictîåoutput_encodingîåutf-8îåoutput_encoding_error_handlerîj
��åerror_encodingîåUTF-8îåerror_encoding_error_handlerîåbackslashreplaceîå
language_codeîåenîårecord_dependenciesîNåconfigîNå	id_prefixîhåauto_id_prefixîåidîå
dump_settingsîNådump_internalsîNådump_transformsîNådump_pseudo_xmlîNåexpose_internalsîNåstrict_visitorîNå_disable_configîNå_sourceîh&å_destinationîNå
_config_filesî]îåpep_referencesîNåpep_base_urlîå https://www.python.org/dev/peps/îåpep_file_url_templateîåpep-%04dîårfc_referencesîNårfc_base_urlîåhttps://tools.ietf.org/html/îå	tab_widthîKåtrim_footnote_reference_spaceîâåfile_insertion_enabledîàåraw_enabledîKåsyntax_highlightîålongîåsmart_quotesîàåsmartquotes_localesîNåcharacter_level_inline_markupîâådoctitle_xformîâå
docinfo_xformîKåsectsubtitle_xformîâåembed_stylesheetîâåcloak_email_addressesîàåenvîNågettext_compactîàubåreporterîNåindirect_targetsî]îåsubstitution_defsî}îåsubstitution_namesî}îårefnamesî}îårefidsî}îånameidsî}î(j›	��j⁄	��hh|j…��j∆��j<��j9��j���j˝��jö��jó��j¡��jæ��j��jˇ��jF	��jC	��jé��jã��j—��jŒ��j>	��j;	��j’	��j“	��uå	nametypesî}î(j›	��NhNj…��Nj<��Nj���Njö��Nj¡��Nj��NjF	��Njé��Nj—��Nj>	��Nj’	��Nuh}î(j⁄	��h8h|hKj∆��hÇj9��h°j˝��j?��jó��j��jæ��jù��jˇ��jÃ��jC	��j��jã��j$��jŒ��jë��j;	��j‘��j“	��jI	��jÍ��j≈��uå
footnote_refsî}îå
citation_refsî}îå
autofootnotesî]îåautofootnote_refsî]îåsymbol_footnotesî]îåsymbol_footnote_refsî]îå	footnotesî]îå	citationsî]îåautofootnote_startîKåsymbol_footnote_startîK�åid_startîKåparse_messagesî]îåtransform_messagesî]îåtransformerîNå
decorationîNhhub.