Table: algolia_index - Query Algolia Indices using SQL
Algolia is a powerful search-as-a-service solution, making it easy to build and manage search functionality for your websites and mobile applications. Indices in Algolia represent the data sets that are searchable by a search interface. They contain a collection of records, each one representing a specific object, and can be configured with various settings to fine-tune how the data is processed, stored, and retrieved.
Table Usage Guide
The algolia_index
table provides insights into Indices within Algolia. As a developer or data analyst, explore index-specific details through this table, including settings, task status, and associated metadata. Utilize it to uncover information about indices, such as their configuration, the status of indexing tasks, and the retrieval of index-specific data.
Examples
List all indices
Discover the segments that have been created within a certain timeframe to understand the volume of data entries. This can help in assessing the performance and efficiency of data indexing within your system.
select name, created_at, entriesfrom algolia_indexorder by name;
select name, created_at, entriesfrom algolia_indexorder by name;
Top 5 largest indices
Discover the segments that have the highest number of entries in your Algolia index. This allows you to identify areas of your database that are heavily populated and might require optimization or closer review.
select name, entries, data_sizefrom algolia_indexorder by entries desc;
select name, entries, data_sizefrom algolia_indexorder by entries desc;
Indices last updated more than 7 days ago
Discover the segments that have not been updated in the last 7 days. This can be useful in identifying stale or outdated data that may need refreshing or removal.
select name, updated_atfrom algolia_indexwhere age(updated_at) > interval '7 days';
select name, updated_atfrom algolia_indexwhere julianday('now') - julianday(updated_at) > 7;
Schema for algolia_index
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
created_at | timestamp with time zone | Index creation date. If empty then the index has no records. | |
data_size | bigint | Number of bytes of the index in minified format. | |
entries | bigint | Number of records contained in the index. | |
file_size | bigint | Number of bytes of the index binary file. | |
last_build_time_secs | bigint | Last build time in seconds. | |
name | text | Index name. | |
primary | text | Only present if the index is a replica. Contains the name of the related primary index. | |
replicas | jsonb | Only present if the index is a primary index with replicas. Contains the names of all linked replicas. | |
settings | jsonb | Index settings. | |
updated_at | timestamp with time zone | Date of last update. An empty string means that the index has no records. |
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_index