steampipe plugin install algolia

Table: algolia_search_metadata - Query Algolia Search Metadata using SQL

Algolia is a search and discovery API platform that provides a seamless search and discovery experience across devices and platforms. It enables developers to build search functionality into their applications, websites, and software. Algolia's Search Metadata is a resource that provides insights into search operations and their associated metadata.

Table Usage Guide

The algolia_search_metadata table provides insights into search operations within Algolia. As a developer or data analyst, explore details about search operations through this table, including search queries, hits, processing time, and associated metadata. Utilize it to uncover information about search patterns, performance metrics, and the optimization of search operations.

Examples

Get facet data for each index

Analyze the different facets of your search indices to understand their structure and characteristics. This can help in optimizing your search functionality for better user experience.

select
index,
jsonb_pretty(facets)
from
algolia_search_metadata;
select
index,
facets
from
algolia_search_metadata;

Number of hits and time take per index for a query

Analyze the performance of a specific search term in an Algolia-powered search system. This allows you to understand which indices are most frequently hit and how long it takes to process each hit, helping to optimize search performance.

select
index,
num_hits,
processing_time_ms
from
algolia_search_metadata
where
query = 'aws vpc'
order by
processing_time_ms desc;
select
index,
num_hits,
processing_time_ms
from
algolia_search_metadata
where
query = 'aws vpc'
order by
processing_time_ms desc;

Schema for algolia_search_metadata

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
ab_test_variant_idbigintIf a search encounters an index that is being A/B tested, this reports the variant ID of the index used.
around_lat_longtextThe computed geo location. Format: ${lat},${lng}, where the latitude and longitude are expressed as decimal floating point numbers.
automatic_radiustextThe automatically computed radius.
exhaustive_facets_countbooleanWhether the facet count is exhaustive (true) or approximate (false).
exhaustive_num_hitsbooleanWhether the nbHits is exhaustive (true) or approximate (false).
facetsjsonbA mapping of each facet name to the corresponding facet counts.
facets_statsjsonbStatistics for numerical facets.
hits_per_pagebigintThe maximum number of hits returned per page.
indextext=Name of the index for the search result.
index_usedtextIndex name used for the query. In the case of an A/B test, the targeted index isn’t always the index used by the query.
messagetextUsed to return warnings about the query.
num_hitsbigintThe number of hits matched by the query.
num_pagesbigintThe number of returned pages. Calculation is based on the total number of hits (nbHits) divided by the number of hits per page (hitsPerPage), rounded up to the nearest integer.
pagebigintIndex of the current page (zero-based). See the page search parameter.
paramsjsonbParameters passed to the search.
parsed_querytextThe query string that will be searched, after normalization. Normalization includes removing stop words (if removeStopWords is enabled), and transforming portions of the query string into phrase queries.
processing_time_msbigintTime the server took to process the request, in milliseconds. This does not include network time.
querytext=Query for the saerch.
query_after_removaltextA markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set.
query_idtextUnique identifier of the search query, to be sent in Insights methods. This identifier links events back to the search query it represents.
server_usedtextActual host name of the server that processed the request.
user_datajsonbUser data results from the search.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- algolia

You can pass the configuration to the command with the --config argument:

steampipe_export_algolia --config '<your_config>' algolia_search_metadata