Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

algolia-get-remote-index-names.js 477 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  1. const { namePrefix } = require('./config')
  2. const getAlgoliaClient = require('./algolia-client')
  3. module.exports = async function getRemoteIndexNames () {
  4. const algoliaClient = getAlgoliaClient()
  5. const indices = await algoliaClient.listIndexes()
  6. // ignore other indices that may be present in the Algolia account like `helphub-`, etc
  7. const indexNames = indices.items
  8. .map(field => field.name)
  9. .filter(name => name.startsWith(namePrefix))
  10. return indexNames
  11. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...