Elastic Search: Add search to your website


Onboard your data

Elastic Search Quick Start

In this 3 video Quick Start series, you'll learn about Elastic Search: modern, natural search experiences with pretuned relevance for your apps and websites. See how quickly you can get set up, ingest data, discover the search interface, and analyze and tune a search engine for your needs. Topics include what is Elastic Search, indexing data into Elastic Enterprise Search, and analyzing and refining search.

Create an Elastic Cloud account

Get started with a 14-day trial. Once you go to cloud.elastic.co and create an account, follow the steps below to learn how to launch your first Elastic stack in any one of our 50+ supported regions globally.

If you click on Edit setting you can choose a cloud provider, including Google Cloud, Microsoft Azure, or AWS. Once you select your cloud provider you’ll be able to select the relevant region. Next, you have the option to choose between a few different hardware profiles so you can better customize the deployment to suit your needs. Plus, the latest version of Elastic has already been preselected for you.

For this particular use case, you’ll need a 4GB RAM instance. To create that, select Advanced settings, then scroll to the bottom to the Enterprise Search instance at the bottom, and select the drop down to increase the Size per zone to 4GB RAM prior to creating your deployment. After completing this you can select Create deployment.

While your deployment is being created, you'll be given a username and password. Be sure to copy or download this as you'll need it when you install your integrations.

Ingest data with the Elastic Web Crawler

Now that you've created your deployment it's time to get data into Elastic. Let's do this by using Elastic's Web Crawler. First, you'll select the tile, Add search to my website.

Next, select Start on the flywheel that appears.

To set up the Web crawler, check out this guided tour or follow the instructions below:

Now create an index. For the purpose of this guide I’m going to ingest blogs across elastic.co

Once you give your index a name select Create index. Next, you'll Validate Domain and then Add domain.

After you add the domain in the lower right you'll select Edit so you can add a subdomain if needed.

Next, you'll select Crawl rules and add your crawl rules as seen below.*

*Because the page you want to crawl will have pages linked to it you should add the additional rules to disallow those links and all any others.

Connect to your databases with Elasticsearch

Another option you have is to add content from your database. For this, you'll select Use a connector as the ingestion method.

Next you'll select MongoDB and enter the information gathered above in the configuration of the MongoDB connector. Be sure to set the 'Direct connection' to 'false', unless there is a reason to force reads against a specific named host (Refer MongoDB connection guide for details).

After you've entered your information select the Scheduling tab to set the database synchronization schedule you prefer for your use case. After configuring the scheduling options, click Sync complete the process.

Working with Elasticsearch

Leverage Vector Search for building search experiences

Are you considering using vector search as part of your search experience? Elastic has two forms of vector search: "dense" (aka, kNN vector search) and "sparse" such as Elastic's Learned Sparse Encoder (ELSER).

Sparse vector search is the simpler option to get started with. Elastic offers an out-of-the-box model, the Learned Sparse Encoder model, for semantic search. This model outperforms on a variety of datasets, such as financial data, weather records, question-answer pairs, among others. The model is built to provide great relevance across domains, without the need for additional fine tuning.

Check out this interactive demo to see how search results are more relevant when you test Elastic's Learned Sparse Encoder model against Elastic's textual BM25 algorithm.

In addition, Elastic also supports kNN vectors to implement similarity search on unstructured data beyond text, such as videos, images, and audio.

The advantage of semantic search and vector search is that these technologies allow customers to use intuitive language in their search queries. For example, if you wanted to search for workplace guidelines on a second income, you could search for “side hustle”, which is not a term you're likely to see in a formal HR document.

For getting started with building a semantic search experience using vector search, check out this step-by-step guide.

Next steps

Thanks for taking the time to connect your databases to Elasticsearch with Elastic Cloud. As you begin your journey with Elastic, understand some operational, security, and data components you should manage as a user when you deploy across your environment.