All docs
This doc
Function |
|
---|---|
Description | Returns records which match the given facet path/category path and other search options. |
Output | A JSON String array containing the records in the ‘message’ element within the argument of the success callback. |
var drillDownReq = { tableName : "TEST", //table name drillDownInfo : { categories : [ // list of facet fields to match { fieldName : "facetField1", //Only records which has the path A, B, C in facetField1 path : ["Srilanka", "Colombo"] }, { fieldName : "facetField2", //Only records which has the path X, Y, Z in facetField2 path : [ "2015", "Mar", "23"] }] query : "field1 : value1", //Additional lucene query, optional recordStart : 0, //starting indexing of matching record set recordCount : 50, // paging size for pagination sortBy : [ { field : "field1", //first field which is used to sort the records sortType : "DESC" //type of sorting }, { field : "field2", //This field will be used to sort the records if field1 has the same value for some records, so those record will be sorted by the second field "field2" sortType : "ASC" } ] }; client.drillDownSearch(drillDownReq, function(data) { console.log (data["message"]); }, function(error) { console.log("error occured: " + error); });
[ { "id":"14242656601230.5739142271249453", "tableName":"TEST", "timestamp":1424265660123, "values":{ "product":"wso2cdm", "field1" : 23, "field2" : 43, "facetField1" : ["Srilanka", "Colombo"], "facetField2" : ["2015", "Mar", "23"] } }, { "id":"14242656601230.5739142271249451", "tableName":"TEST", "timestamp":1424265660123, "values":{ "product":"wso2cdm", "field1" : 23, "field2" : 41, "facetField1" : ["Srilanka", "Colombo"], "facetField2" : ["2015", "Mar", "23"] } } ]