Splunk Search

Why is sorting by time reducing the number of my search results?

ulrich_track
Path Finder

I made a search over two indexes (OR connected) and five sourcetypes (OR connected), limited the time to two days and received 26,300 events. Now I pipe this to a sort _time and suddenly only 10,000 of 26,300 events match?

What is wrong here? Since when does sorting filter results?

Example:

index="index-one" OR index="index-two" sourcetype="sourcetype-one" OR sourcetype="sourcetype-two" OR sourcetype="sourcetype-three" OR sourcetype="sourcetype-four" OR sourcetype="sourcetype-five" | sort _time
Tags (4)
0 Karma
1 Solution

tom_frotscher
Builder

Hi,

sort is limited to 10000 results. Use this:

| sort limit=0 _time

or just

| sort 0 _time

Greetings

Tom

View solution in original post

tom_frotscher
Builder

Hi,

sort is limited to 10000 results. Use this:

| sort limit=0 _time

or just

| sort 0 _time

Greetings

Tom

Get Updates on the Splunk Community!

Routing Data to Different Splunk Indexes in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...

Getting Started with AIOps: Event Correlation Basics and Alert Storm Detection in ...

Getting Started with AIOps:Event Correlation Basics and Alert Storm Detection in Splunk IT Service ...

Register to Attend BSides SPL 2022 - It's all Happening October 18!

Join like-minded individuals for technical sessions on everything Splunk!  This is a community-led and run ...