Skip to content

Commit 52a4e99

Browse files
committed
Restore data ingestion step 😁
1 parent bf9acf9 commit 52a4e99

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

solutions/search/esql-full-text-filter-tutorial.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,25 @@ PUT /cooking_blog/_mapping
9595
Full-text search is powered by [text analysis](full-text/text-analysis-during-search.md). Text analysis normalizes and standardizes text data so it can be efficiently stored in an inverted index and searched in near real-time. Analysis happens at both [index and search time](../../manage-data/data-store/text-analysis/index-search-analysis.md). This tutorial won't cover analysis in detail, but it's important to understand how text is processed to create effective search queries.
9696
::::
9797

98-
## Step 2: Perform basic full-text searches
98+
## Step 2: Add sample blog posts to your index [full-text-filter-tutorial-index-data]
99+
100+
Now you’ll need to index some example blog posts using the [Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings). Note that `text` fields are analyzed and multi-fields are generated at index time.
101+
102+
```console
103+
POST /cooking_blog/_bulk?refresh=wait_for
104+
{"index":{"_id":"1"}}
105+
{"title":"Perfect Pancakes: A Fluffy Breakfast Delight","description":"Learn the secrets to making the fluffiest pancakes, so amazing you won't believe your tastebuds. This recipe uses buttermilk and a special folding technique to create light, airy pancakes that are perfect for lazy Sunday mornings.","author":"Maria Rodriguez","date":"2023-05-01","category":"Breakfast","tags":["pancakes","breakfast","easy recipes"],"rating":4.8}
106+
{"index":{"_id":"2"}}
107+
{"title":"Spicy Thai Green Curry: A Vegetarian Adventure","description":"Dive into the flavors of Thailand with this vibrant green curry. Packed with vegetables and aromatic herbs, this dish is both healthy and satisfying. Don't worry about the heat - you can easily adjust the spice level to your liking.","author":"Liam Chen","date":"2023-05-05","category":"Main Course","tags":["thai","vegetarian","curry","spicy"],"rating":4.6}
108+
{"index":{"_id":"3"}}
109+
{"title":"Classic Beef Stroganoff: A Creamy Comfort Food","description":"Indulge in this rich and creamy beef stroganoff. Tender strips of beef in a savory mushroom sauce, served over a bed of egg noodles. It's the ultimate comfort food for chilly evenings.","author":"Emma Watson","date":"2023-05-10","category":"Main Course","tags":["beef","pasta","comfort food"],"rating":4.7}
110+
{"index":{"_id":"4"}}
111+
{"title":"Vegan Chocolate Avocado Mousse","description":"Discover the magic of avocado in this rich, vegan chocolate mousse. Creamy, indulgent, and secretly healthy, it's the perfect guilt-free dessert for chocolate lovers.","author":"Alex Green","date":"2023-05-15","category":"Dessert","tags":["vegan","chocolate","avocado","healthy dessert"],"rating":4.5}
112+
{"index":{"_id":"5"}}
113+
{"title":"Crispy Oven-Fried Chicken","description":"Get that perfect crunch without the deep fryer! This oven-fried chicken recipe delivers crispy, juicy results every time. A healthier take on the classic comfort food.","author":"Maria Rodriguez","date":"2023-05-20","category":"Main Course","tags":["chicken","oven-fried","healthy"],"rating":4.9}
114+
```
115+
116+
## Step 5: Perform basic full-text searches
99117

100118
Full-text search involves executing text-based queries across one or more document fields. These queries calculate a relevance score for each matching document, based on how closely the document's content aligns with the search terms. Elasticsearch offers various query types, each with its own method for matching text and relevance scoring.
101119

@@ -264,7 +282,7 @@ POST /_query?format=txt
264282

265283
Like the `term` query in Query DSL, this has zero flexibility and is case-sensitive.
266284

267-
## Step 5: Combine multiple search criteria
285+
## Step 6: Combine multiple search criteria
268286

269287
Complex searches often require combining multiple search criteria:
270288

0 commit comments

Comments
 (0)