Search your data
editSearch your data
editA search query, or query, is a request for information about data in Elasticsearch data streams or indices.
You can think of a query as a question, written in a way Elasticsearch understands. Depending on your data, you can use a query to get answers to questions like:
- What processes on my server take longer than 500 milliseconds to respond?
- What users on my network ran regsvr32.exe within the last week?
- What pages on my website contain a specific word or phrase?
You run search queries using the search API. The API supports several query types and search methods:
Search for exact values. Use term-level queries to filter numbers, dates, IPs, or strings based on exact values or ranges.
Full-text search. Use full-text queries to query unstructured text and find documents that best match query terms. Use synonyms to search for words or phrases that have the same or similar meaning.
Vector search. Store dense vectors in Elasticsearch and use approximate nearest neighbor (ANN) or k-nearest neighbor (kNN) search to find similar vectors.
You can also use Elastic’s natural language processing (NLP) model to encode text as sparse or dense vectors. Then use semantic search to find data based on the intent and contextual meaning rather than matching keywords.