How to Use Vultr's Elasticsearch Marketplace Application
![How to Use Vultr's Elasticsearch Marketplace Application header image](https://docs.vultr.com/public/doc-assets/new/how-to-use-vultr-s-elasticsearch-marketplace-application/db6af69aa3d51e6f.png)
Introduction
Elasticsearch is a distributed, open-source search and analytics engine built on Apache Lucene. It's designed for horizontal scalability, reliability, and real-time search capabilities. Elasticsearch is commonly used for a variety of applications due to its powerful full-text search, analytics, and data indexing features.
This article explains how to use Vultr's Elasticsearch Marketplace Application. You will test the Elasticsearch deployment by indexing a sample document and running a search query.
Deploy Elasticsearch on Vultr
Login to your Vultr Customer Portal and click the Deploy Server button.
Select Optimized Cloud Compute as a server type.
Choose a nearby server location amongst the 32 global locations.
Select Elasticsearch as the Marketplace Application.
Select a server size as per requirements.
Choose any Additional Features as per requirements.
Click the Deploy Now button to start the instance deployment.
Once the instance is deployed go to the server details and copy the SSH details.
Perform Operation with Elasticsearch
With Vultr Marketplace's Elasticsearch application, users can seamlessly integrate search capabilities across websites, applications, and workplaces. This powerful tool utilizes machine learning for semantic search, enhancing relevance by understanding user intent. It also supports advanced vector queries, flexible deployment options including serverless, and allows for customization and relevance tuning to meet specific business needs.
Confirm if the Elasticsearch server is responding.
console$ curl -X GET "http://<SERVER-IP>:9200/"
Output:
{ "name" : "vultr", "cluster_name" : "elasticsearch", "cluster_uuid" : "5bEdkKnFTGSrPCJRCQGOuA", "version" : { "number" : "8.14.3", "build_flavor" : "default", "build_type" : "deb", "build_hash" : "d55f984299e0e88dee72ebd8255f7ff130859ad0", "build_date" : "2024-07-07T22:04:49.882652950Z", "build_snapshot" : false, "lucene_version" : "9.10.0", "minimum_wire_compatibility_version" : "7.17.0", "minimum_index_compatibility_version" : "7.0.0" }, "tagline" : "You Know, for Search" }
Add a sample document to Elasticsearch.
console$ curl -X POST "<http://localhost:9200/test-index/_doc/1>" -H 'Content-Type: application/json' -d' { "title": "Sample Document", "content": "This is a sample document added to Elasticsearch." }'
Output:
{"_index":"test-index","_id":"1","_version":3,"result":"updated","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":2,"_primary_term":1}
Retrieve the document you just added.
console$ curl -X GET "http://<SERVER-IP>:9200/test-index/_doc/1"
Output:
{"_index":"test-index","_id":"1","_version":3,"_seq_no":2,"_primary_term":1,"found":true,"_source": { "title": "Sample Document", "content": "This is a sample document added to Elasticsearch." }}
Search the index.
console$ curl -X GET "http://<SERVER-IP>:9200/test-index/_search" -H 'Content-Type: application/json' -d' { "query": { "match": { "content": "test" } } }'
console{"took":47,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":1,"relation":"eq"},"max_score":0.2876821,"hits":[{"_index":"test-index","_id":"1","_score":0.2876821,"_source": { "title": "Sample Document", "content": "This is a sample document added to Elasticsearch." }}]}}
Elasticsearch Use-Cases
Search Applications:
Website Search: Powers search functionality for websites and applications, enabling users to quickly find relevant information.
Enterprise Search: Provides search capabilities for enterprise content, including documents, emails, and intranet data.
Data Analytics:
Business Intelligence: Aggregates and analyzes large datasets to gain business insights.
Operational Analytics: Monitors and analyzes operational metrics and key performance indicators (KPIs).
Log and Event Data Analysis:
Log Management: Centralizes logs from different sources, making it easy to search and analyze logs.
Security Analytics: Monitors security events and analyzes intrusion detection logs.
Conclusion
In this article, you deployed Vultr's Elasticsearch Marketplace Application. You performed operations utilizing the features and capabilities of Elasticsearch. With pre-installed Marketplace Application on a Vultr server developers can save hours of setup time and focus on actual application development.