The latest version for DAS is WSO2 Data Analytics Server 3.1.0. View documentation for the latest release.
WSO2 Data Analytics Server is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.

All docs This doc
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
||
Skip to end of metadata
Go to start of metadata

Overview

Function

drillDownSearch(drillldownRequest, success, error)

Description

Returns records which match the given facet path/category path and other search options.

OutputA JSON String array containing the records in the ‘message’ element within the argument of the success callback.

Example

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);  
});

Sample output

  [  
   {  
      "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"]

       }
   }
 ]
  • No labels