Elasticsearch Simple Query String Query

In this tutorial, we’re gonna look at Elasticsearch Simple Query String Query that allows us to specify AND|OR|NOT… conditions and multi-field search within a single query string. Unlike query_string query (which is recommended for expert users only), simple_query_string query discards invalid parts of the query and never throws an exception.

[Continue reading…] “Elasticsearch Simple Query String Query”

Elasticsearch Compound Queries

Compound queries wrap other compound or leaf queries to combine results and scores, to change behaviour, or to switch from query to filter context. In this tutorial, we’re gonna look at types of compound query: Constant Score, Bool, Dis Max, Function Score and Boosting Query.

Related post: Elasticsearch Compound Queries – Function Score Query

[Continue reading…] “Elasticsearch Compound Queries”

Elasticsearch Term Level Queries – Fuzzy Query

Searching natural language is imprecise because computers can’t comprehend entire natural language. Fuzzy Query can find words that need at most a certain number of character modifications to match. In this tutorial, we’re gonna look at way to use Elasticsearch Fuzzy Query that uses similarity based on Levenshtein edit distance.

[Continue reading…] “Elasticsearch Term Level Queries – Fuzzy Query”

Elasticsearch Multi Match Query – More Practice

We have known some basic Elasticsearch Multi Match Queries. This tutorial shows you more practice: how Operater affects to Best Fields/Most Fields/Cross Fields type, how to use Tie Breaker with Cross Fields type, Fuzziness in Multi Match Query…

[Continue reading…] “Elasticsearch Multi Match Query – More Practice”

Elasticsearch Character Filters

Elasticsearch Character Filters preprocess (adding, removing, or changing) the stream of characters before it is passed to Tokenizer. In this tutorial, we’re gonna look at 3 types of Character Filters: HTML Strip, Mapping, Pattern Replace that are very important to build Customer Analyzers.

[Continue reading…] “Elasticsearch Character Filters”

Elasticsearch Tokenizers – Word Oriented Tokenizers

A tokenizer breaks a stream of characters up into individual tokens (characters, words…), then outputs a stream of tokens. We can also use tokenizer to record the order or position of each term (for phrase and word proximity queries), or the start and end character offsets of the original word which the term represents (for highlighting search snippets).

In this tutorial, we’re gonna look at how to use some Word Oriented Tokenizers which tokenize full text into individual words.

[Continue reading…] “Elasticsearch Tokenizers – Word Oriented Tokenizers”

Elasticsearch Term Level Queries – Regexp Query

regexp query help us to use regular expression term queries. Elasticsearch will apply the regexp to the terms produced by the tokenizer for that field (not to the original text).

[Continue reading…] “Elasticsearch Term Level Queries – Regexp Query”

Elasticsearch Term Level Queries – Term & Terms Query

We had known that Full text queries will analyse query string before executing. In this tutorial, we’re gonna look at term-level queries (Term & Terms Query) that operate on the exact terms which are stored in the inverted index.

These queries are usually used for structured data (numbers, dates, enums…), rather than full text fields.

[Continue reading…] “Elasticsearch Term Level Queries – Term & Terms Query”

Elasticsearch Multi Match Query – Basic

In previous post, we had known some different types of queries. This tutorial shows some simple ways to use Multi Match Query and several types of them.

Related Posts:
Elasticsearch Overview
ElasticSearch – Structure of a Search Request/Response
ElasticSearch Filter vs Query
ElasticSearch Full Text Queries – Basic

More Practice: Elasticsearch Multi Match Query – More Practice

[Continue reading…] “Elasticsearch Multi Match Query – Basic”

ElasticSearch Full Text Queries – Basic

There are many ways to query for things in Elasticsearch, depending on how the data is stored. In this tutorial, we’re gonna look at some different types of queries that Elasticsearch supports and try out some examples of how to use them.

Related Posts:
Elasticsearch Overview
ElasticSearch – Structure of a Search Request/Response
ElasticSearch Filter vs Query

[Continue reading…] “ElasticSearch Full Text Queries – Basic”

ElasticSearch Filter vs Query

ElasticSearch has two ways to limit the number of documents to return, depending on the context. This tutorial gives you overview of these ways which we call Query and Filter.

Related Posts:
Elasticsearch Overview
ElasticSearch – Structure of a Search Request/Response
ElasticSearch Full Text Queries – Basic

[Continue reading…] “ElasticSearch Filter vs Query”

ElasticSearch – Structure of a Search Request/Response

Elasticsearch search requests are JSON document-based requests or URL-based requests. The requests are sent to the server with the same format, so we should understand some important components that we can change for each search request and look at a typical response.

Related Posts:
Elasticsearch Overview
ElasticSearch Filter vs Query
ElasticSearch Full Text Queries – Basic

[Continue reading…] “ElasticSearch – Structure of a Search Request/Response”

Angular 4 ElasticSearch example – simple Full Text Search

In the previous posts, we had know how to get All Documents in Index and show them with pagination. This tutorial show you way to implement a simple Full Text Search in an Angular 4 Application.

Related Post:
Angular 4 ElasticSearch – Quick Start – How to add Elasticsearch.js
Angular 4 ElasticSearch example – How to create an Index
Angular 4 ElasticSearch example – Add Document to Index
Angular 4 ElasticSearch example – Get All Documents in Index
Angular 4 ElasticSearch example – Documents Pagination with Scroll

[Continue reading…] “Angular 4 ElasticSearch example – simple Full Text Search”