AbdulElahGwaith's picture
Upload folder using huggingface_hub
88df9e4 verified

Elastic Search Indexing

Elasticsearch uses indexes to store the data that is used to determine search results.

We use this scripts in this directory to index our Elasticsearch instances.

In production, the indexing happens in the GitHub workflows: index-autocomplete-search.yml and index-general-search.yml

CLI Script

Before running the indexing for general search you run the scrape script to scrape page data into files.

Before running the indexing for AI search autocomplete you need to clone docs-internal-data to the root of this directory.

There is a separate run command for indexing each type of search data:

  1. general search: npm run index-general-search -- <scrape-directory>
  2. AI search autocomplete: npm run index-ai-search-autocomplete -- docs-internal-data (if docs-internal-data is cloned to root directory)

To see the arguments accepted by any script, pass the --help argument, for example

npm run index-ai-search-autocomplete -- --help