Displays statistics about the fields within the current event stream.

ParameterTypeRequiredDefault ValueDescription
limitintegeroptional[a] 200 Limits the number of fields to generate statistics for.
  Minimum1 
  Maximum10,000 

[a] Optional parameters use their default value unless explicitly set.

The function returns an event set that contains statistics for the fields in the current event set; the returned fields include:

  • #type

    The name of the parsing used when the data was ingested.

  • field

    The name of field for the statistics.

  • _count

    The number of values for the named field within the incoming event set.

  • distinct

    The number of distinct values for the named field in the incoming event set.

fieldstats() Examples

Click + next to an example below to get the full details.

Extract Field Statistics

Extract field statistics from a repository using the fieldstats() function