analyze

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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