Splunk Dev

How to get more than 100 rows in web framework using Django binding?

tommywang
Explorer

Hello,
I'm working on web framework by using Django binding.
I got a problem recently that I couldn't get more than 100 rows by using the following code. Is there anyone who knows how to solve this problem?
Thanks in advance.

mySearch = splunkjs.mvc.Components.getInstance("search1");

myResults = mySearch.data("results");

myResults.on("data", function() {

var artistData = myResults.data().rows;        // The search results
$(artistData).each(function(i,artistDatum ) {
    device[i] = artistDatum[0];     
});

})

Tags (2)

kendelar
Engager

Hello , This is also my problem.I tried yours answers but its not working.

0 Karma

jedatt01
Builder

Try this: sorry i'm not a jquery guy but the js should work for you

var artistData = myResults.data('results', {
       output_mode: 'json_rows',
       count: 0 //this setting is what allows you to get more than 100 rows
});

$(artistData).each(function(i,artistDatum ) {
     device[i] = artistDatum[0];        
});

slashnburn
Path Finder

This is similar to a problem I am having. I am looping through my result set, but it is only returning 100 results. Is this something I can change in the search manager.

this.parsesplunkRows = function() {
    console.log("" + " " + splunkRows.length);
    for(var i = 0; i<this.splunkRows.length; i++) {
     this.splitString(this.splunkRows[i]);
    }
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...