@Role
public interface DataManager
Modifier and Type | Method and Description |
---|---|
com.google.gson.JsonObject |
countInstalls(String indexType,
String fullQuery,
Map<String,Object> parameters)
Executes a Count query for Active Installs.
|
com.google.gson.JsonObject |
searchInstalls(String indexType,
String fullQuery,
Map<String,Object> parameters)
Executes a Search query for Active Installs.
|
com.google.gson.JsonObject searchInstalls(String indexType, String fullQuery, Map<String,Object> parameters) throws Exception
indexType
- the Elastic Search index type (e.g. "installs" or "installs2". Some XWiki instances may have
sent pings stored under a given index type while other instances may have used another index type (and
thus another data format). We use the index type to match a given data model. The Active Installs Client
module should be checked to understand the data model used.fullQuery
- the full Elastic Search query used to search for installs. For example:
{
"query" : {
"term": { "distributionVersion" : "5.2" }
}
}
parameters
- the ElasticSearch search parameters to use (see for example
Search URI parameters)
{
"took": 97,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 2,
"max_score": 1,
"hits": [
{
"_index": "installs",
"_type": "install",
"_id": "id1",
"_score": 1,
"_source": {
"distributionVersion": "5.2",
...
}
},
{
"_index": "installs",
"_type": "install",
"_id": "id2",
"_score": 0.625,
"_source": {
"distributionVersion": "5.2-SNAPSHOT",
...
}
}
]
}
}
Exception
- when an error happens while retrieving the datacom.google.gson.JsonObject countInstalls(String indexType, String fullQuery, Map<String,Object> parameters) throws Exception
indexType
- the Elastic Search index type (e.g. "installs" or "installs2". Some XWiki instances may have
sent pings stored under a given index type while other instances may have used another index type (and
thus another data format). We use the index type to match a given data model. The Active Installs Client
module should be checked to understand the data model used.fullQuery
- the full Elastic Search query used to search for installs.parameters
- the ElasticSearch count parameters to use (see for example
Count API)Exception
- when an error happens while retrieving the dataCopyright © 2004–2022 XWiki. All rights reserved.