The areResultsTransformed() method indicates whether or not search results are transformed. Results are transformed when search commands, such as timechart and stats, have populated the results set with different data than the events set. Use this method to determine whether to retrieve data from the job events set or results set.
results = areResultsTransformed()
|
Boolean |
Results endpoint returns transformed results indication: true = Search results are transformed. false = Search results are not transformed. |
var context = this.getContext();
var search = context.get('search');
var entityName;
if (search.job.areResultsTransformed()) {
entityName = 'results';
} else {
entityName = 'events';
}
console.log(entityName);