Skip to content

Commit 17c844a

Browse files
committed
Prune intro
1 parent 5156edc commit 17c844a

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

docs/reference/query-languages/query-dsl/full-text-filter-tutorial.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,27 @@ products:
1111

1212
# Get started with Query DSL search and filters [full-text-filter-tutorial]
1313

14-
This is a hands-on introduction to the basics of [full-text search](docs-content://solutions/search/full-text.md) with {{es}}, also known as *lexical search*, using the [`_search` API]({{es-apis}}operation/operation-search) and Query DSL.
15-
You'll also learn how to filter data to narrow down search results based on exact criteria.
14+
This is a hands-on introduction to the basics of full-text search with {{es}}, also known as *lexical search*, using the `_search` API and Query DSL.
1615

17-
In this quickstart, you'll implement a search function for a cooking blog. The blog contains recipes with various attributes including textual content, categorical data, and numerical ratings.
18-
19-
The goal is to create search queries that enable users to:
16+
You'll implement a search function for a cooking blog that contains recipes with textual content, categorical data, and numerical ratings.
17+
You'll apply filters to narrow down search results and combine multiple search criteria.
18+
For example, in this scenario you might want to:
2019

2120
* Find recipes based on preferred or avoided ingredients
2221
* Explore dishes that meet specific dietary needs
2322
* Find top-rated recipes in specific categories
2423
* Find the latest recipes from favorite authors
2524

26-
To achieve these goals, you'll use different Elasticsearch queries to perform full-text search, apply filters, and combine multiple search criteria.
25+
::::{tip}
26+
The code examples are in [Console](docs-content://explore-analyze/query-filter/tools/console.md) syntax by default.
27+
You can [convert into other programming languages](docs-content://explore-analyze/query-filter/tools/console.md#import-export-console-requests) in the Console UI.
28+
::::
2729

2830
## Requirements [full-text-filter-tutorial-requirements]
2931

30-
You'll need a running {{es}} cluster, together with {{kib}} to use the Dev Tools API Console. Refer to [choose your deployment type](docs-content://deploy-manage/deploy.md#choosing-your-deployment-type) for deployment options.
31-
32-
Want to get started quickly? Run the following command in your terminal to set up a [single-node local cluster in Docker](docs-content://solutions/search/run-elasticsearch-locally.md):
33-
34-
```sh
35-
curl -fsSL https://elastic.co/start-local | sh
36-
```
32+
You can follow these steps in any {{es}} deployment.
33+
To see all deployment options, refer to [Choosing your deployment type](docs-content://deploy-manage/deploy.md#choosing-your-deployment-type).
34+
To get started quickly, set up a [single-node local cluster in Docker](docs-content://solutions/search/run-elasticsearch-locally.md).
3735

3836
## Create an index [full-text-filter-tutorial-create-index]
3937

@@ -200,7 +198,7 @@ At search time, {{es}} defaults to the analyzer defined in the field mapping. In
200198
```
201199

202200
1. `hits`: Contains the total number of matching documents and their relation to the total.
203-
2. `max_score`: The highest relevance score among all matching documents. In this example, we only have one matching document.
201+
2. `max_score`: The highest relevance score among all matching documents. In this example, there is only have one matching document.
204202
3. `_score`: The relevance score for a specific document, indicating how well it matches the query. Higher scores indicate better matches. In this example the `max_score` is the same as the `_score`, as there is only one matching document.
205203
4. The title contains both "Fluffy" and "Pancakes", matching our search terms exactly.
206204
5. The description includes "fluffiest" and "pancakes", further contributing to the document's relevance due to the analysis process.
@@ -275,7 +273,7 @@ GET /cooking_blog/_search
275273

276274
When users enter a search query, they often don't know (or care) whether their search terms appear in a specific field. A [`multi_match`](/reference/query-languages/query-dsl/query-dsl-multi-match-query.md) query allows searching across multiple fields simultaneously.
277275

278-
Let's start with a basic `multi_match` query:
276+
Start with a basic `multi_match` query:
279277

280278
```console
281279
GET /cooking_blog/_search
@@ -291,7 +289,8 @@ GET /cooking_blog/_search
291289

292290
This query searches for "vegetarian curry" across the title, description, and tags fields. Each field is treated with equal importance.
293291

294-
However, in many cases, matches in certain fields (like the title) might be more relevant than others. We can adjust the importance of each field using field boosting:
292+
However, in many cases, matches in certain fields (like the title) might be more relevant than others.
293+
You can adjust the importance of each field using field boosting:
295294

296295
```console
297296
GET /cooking_blog/_search
@@ -395,8 +394,8 @@ GET /cooking_blog/_search
395394
::::{tip}
396395
The `.keyword` suffix accesses the unanalyzed version of a field, enabling exact, case-sensitive matching. This works in two scenarios:
397396

398-
1. **When using dynamic mapping for text fields**. Elasticsearch automatically creates a `.keyword` sub-field.
399-
2. **When text fields are explicitly mapped with a `.keyword` sub-field**. For example, we explicitly mapped the `category` field [in an earlier step](#full-text-filter-tutorial-create-index) of this tutorial.
397+
1. **When using dynamic mapping for text fields**. {{es}} automatically creates a `.keyword` sub-field.
398+
2. **When text fields are explicitly mapped with a `.keyword` sub-field**. For example, you explicitly mapped the `category` field [in an earlier step](#full-text-filter-tutorial-create-index) of this tutorial.
400399

401400
::::
402401

@@ -448,7 +447,7 @@ Avoid using the `term` query for [`text` fields](/reference/elasticsearch/mappin
448447

449448
A [`bool`](/reference/query-languages/query-dsl/query-dsl-bool-query.md) query allows you to combine multiple query clauses to create sophisticated searches. In this tutorial, it's useful when users have complex requirements for finding recipes.
450449

451-
Let's create a query that addresses the following user needs:
450+
Create a query that addresses the following user needs:
452451

453452
* Must be a vegetarian recipe
454453
* Should contain "curry" or "spicy" in the title or description
@@ -562,9 +561,11 @@ GET /cooking_blog/_search
562561

563562
## Learn more [full-text-filter-tutorial-learn-more]
564563

565-
This tutorial introduced the basics of full-text search and filtering in {{es}}. Building a real-world search experience requires understanding many more advanced concepts and techniques. The following resources will help you dive deeper:
564+
This tutorial introduced the basics of full-text search and filtering in {{es}}.
565+
Building a real-world search experience requires understanding many more advanced concepts and techniques.
566+
The following resources will help you dive deeper:
566567

567568
* [Full-text search](docs-content://solutions/search/full-text.md): Learn about the core components of full-text search in {{es}}.
568-
* [Elasticsearch basics — Search and analyze data](docs-content://explore-analyze/query-filter.md): Understand all your options for searching and analyzing data in {{es}}.
569+
* [{{es}} basics — Search and analyze data](docs-content://explore-analyze/query-filter.md): Understand all your options for searching and analyzing data in {{es}}.
569570
* [Text analysis](docs-content://solutions/search/full-text/text-analysis-during-search.md): Understand how text is processed for full-text search.
570571
* [Search your data](docs-content://solutions/search.md): Learn about more advanced search techniques using the `_search` API, including semantic search.

0 commit comments

Comments
 (0)