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

drillDownCategories(drilldownRequest, success, error)

Description

Returns the child categories of the given category along with their scores.

OutputA JSON object containing child categories along with their scores in the ‘message’ element within the argument of the success callback.

Example

var drillDownReq = {
	tableName : "TEST", //tableName
               drillDownInfo : {
                   fieldName : "facetField1", //field which is indexed as a FACET
                   categoryPath : [ "category", "subCategory"] //Path being drilled down, optional
                   query : "logFile : wso2carbon.log" //search query, optional
                   scoreFunction : "sqrt(weight)" //score function
           }
 };
client.drillDownCategories(drillDownReq, function(data) {
      console.log (data["message"]);
}, function(error) {
      console.log("error occured: " + error);  
});

If categoryPath is not provided, it takes the root element of the FACET field as the default path. Therefore, the top level facets are returned.

Sample output

 {
    "categoryPath" : [category, subCategory],
    "categories" : [child1, child2, child3]
}
  • No labels