analyze

package
v1.6.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeStats

type AttributeStats struct {
	Count      int                       `json:"count"`
	Percentage float64                   `json:"percentage"`
	Types      map[AttributeType]float64 `json:"types"`
	InSettings []string                  `json:"inSettings,omitempty"`

	Values map[interface{}]int `json:"values,omitempty"`
}

AttributeStats contains the stats for a single attribute of an Algolia object.

type AttributeType

type AttributeType string

AttributeType is an enum for the different types of attributes.

const (
	// String is the type for string attributes.
	String AttributeType = "string"
	// Numeric is the type for numeric attributes (integers and floats).
	Numeric AttributeType = "numeric"
	// Boolean is the type for boolean attributes.
	Boolean AttributeType = "boolean"
	// Array is the type for array attributes.
	Array AttributeType = "array"
	// Object is the type for object attributes.
	Object AttributeType = "object"
	// Null is the type for null attributes.
	Null AttributeType = "null"
	// Undefined is the type for undefined attributes (not present in the object).
	Undefined AttributeType = "undefined"
)

type Stats

type Stats struct {
	TotalRecords int
	Attributes   map[string]*AttributeStats
}

Stats contains the stats for an Algolia index.

func ComputeStats

func ComputeStats(i iterator.Iterator, s search.Settings, limit int, only string, counter chan int) (*Stats, error)

ComputeStats computes the stats for the given index.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL