<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic oneshot limit java in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/oneshot-limit-java/m-p/569380#M198447</link>
    <description>&lt;P&gt;If I am trying to execute the following code block and my total records is greater than 50K it limits me to the 50K so is there a modified example of this through an offset or pagination technique someone can provide that will allow me to iterate through the full result set beyond the 50k&lt;/P&gt;&lt;P&gt;oneshotSearchArgs.put("earliest_time", yesterday+"T05:00:00.000" );&lt;BR /&gt;oneshotSearchArgs.put("latest_time", today+"T05:00:00.000" );&lt;BR /&gt;oneshotSearchArgs.put("count", 0);&lt;BR /&gt;String oneshotSearchQuery = "search " + searchString;&lt;/P&gt;&lt;P&gt;// The search results are returned directly&lt;BR /&gt;InputStream results_oneshot = service.oneshotSearch(oneshotSearchQuery, oneshotSearchArgs);&lt;/P&gt;&lt;P&gt;// Get the search results and use the built-in XML parser to display them&lt;BR /&gt;ResultsReaderXml resultsReader = new ResultsReaderXml(results_oneshot);&lt;BR /&gt;HashMap&amp;lt;String, String&amp;gt; event;&lt;BR /&gt;int eventsMatched = 0;&lt;BR /&gt;String log = null;&lt;BR /&gt;ArrayList&amp;lt;String&amp;gt; list = new ArrayList&amp;lt;&amp;gt;();&lt;BR /&gt;while ((event = resultsReader.getNextEvent()) != null) {&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Fri, 01 Oct 2021 17:44:22 GMT</pubDate>
    <dc:creator>scott_r</dc:creator>
    <dc:date>2021-10-01T17:44:22Z</dc:date>
    <item>
      <title>oneshot limit java</title>
      <link>https://community.splunk.com/t5/Splunk-Search/oneshot-limit-java/m-p/569380#M198447</link>
      <description>&lt;P&gt;If I am trying to execute the following code block and my total records is greater than 50K it limits me to the 50K so is there a modified example of this through an offset or pagination technique someone can provide that will allow me to iterate through the full result set beyond the 50k&lt;/P&gt;&lt;P&gt;oneshotSearchArgs.put("earliest_time", yesterday+"T05:00:00.000" );&lt;BR /&gt;oneshotSearchArgs.put("latest_time", today+"T05:00:00.000" );&lt;BR /&gt;oneshotSearchArgs.put("count", 0);&lt;BR /&gt;String oneshotSearchQuery = "search " + searchString;&lt;/P&gt;&lt;P&gt;// The search results are returned directly&lt;BR /&gt;InputStream results_oneshot = service.oneshotSearch(oneshotSearchQuery, oneshotSearchArgs);&lt;/P&gt;&lt;P&gt;// Get the search results and use the built-in XML parser to display them&lt;BR /&gt;ResultsReaderXml resultsReader = new ResultsReaderXml(results_oneshot);&lt;BR /&gt;HashMap&amp;lt;String, String&amp;gt; event;&lt;BR /&gt;int eventsMatched = 0;&lt;BR /&gt;String log = null;&lt;BR /&gt;ArrayList&amp;lt;String&amp;gt; list = new ArrayList&amp;lt;&amp;gt;();&lt;BR /&gt;while ((event = resultsReader.getNextEvent()) != null) {&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2021 17:44:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/oneshot-limit-java/m-p/569380#M198447</guid>
      <dc:creator>scott_r</dc:creator>
      <dc:date>2021-10-01T17:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: oneshot limit java</title>
      <link>https://community.splunk.com/t5/Splunk-Search/oneshot-limit-java/m-p/569500#M198498</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239191"&gt;@scott_r&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;50K is default limits of searchresults stanza. You can change it as per your requirements and try again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;maxresultrows = &amp;lt;integer&amp;gt;
* Configures the maximum number of events are generated by search commands
  which grow the size of your result set (such as multikv) or that create
  events. Other search commands are explicitly controlled in specific stanzas
  below.
* This limit should not exceed 50000.
* Default: 50000&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check this limits.conf doc for more information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mw-headline"&gt;searchresults&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.2/Admin/Limitsconf#.5Bsearchresults.5D" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.2/Admin/Limitsconf#.5Bsearchresults.5D&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一 &amp;nbsp; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 05:32:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/oneshot-limit-java/m-p/569500#M198498</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-10-04T05:32:56Z</dc:date>
    </item>
  </channel>
</rss>

