# Elasticsearch の種類とインデックス\_クエリ アナライザー

属性またはカスタム プロパティを処理するために、フィールド ブースティングのデータ型を選択できます。 これらのほとんどは状況に応じたものであり、デフォルトのデータ型では通常、システムがデータのインデックス作成と検索を処理できるようになります。

#### **Boolean** <a href="#w7d0c2ldc51a" id="w7d0c2ldc51a"></a>

フィールドをバイナリの True または False 値として扱います。

**形式:** 「true」または「false」

**Elasticsearch Docs**:

<https://www.elastic.co/guide/en/elasticsearch/reference/current/boolean.html>

#### **Date** <a href="#rlo1vm3xkcd" id="rlo1vm3xkcd"></a>

フィールドを日付範囲検索の作成に使用できる日付時刻に解析します。

**Standard Format:** 「2015-01-01」または「2015/01/01 12:10:30」。

**Elasticsearch Docs**: <https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html>

#### **Keyword** <a href="#id-9frlepnz8a3h" id="id-9frlepnz8a3h"></a>

ID やメールなどの構造化コンテンツに使用します。 並べ替えや値のセットを持つフィールドに役立ちます。

**Elasticsearch Docs**: <https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html>

#### **Number** <a href="#id-9y7xp6nftrij" id="id-9y7xp6nftrij"></a>

フィールドを数値として扱います。これにより、検索で数値を使用したときに、より関連性の高い結果が得られます。

**Elasticsearch Docs**: <https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html>

#### **Text** <a href="#id-2et92p0" id="id-2et92p0"></a>

全文検索とインデックス/クエリ アナライザーの使用が可能になり、フィールド内のテキストをより柔軟に解析および検索できるようになります。

**Elasticsearch Docs**: <https://www.elastic.co/guide/en/elasticsearch/reference/current/text.html>

### Index/Query Analyzers <a href="#vvwtww5p9awt" id="vvwtww5p9awt"></a>

属性またはカスタム プロパティのフィールド ブースティング&#x306E;**\[Data Type]**&#x3068;し&#x3066;**\[Text]**&#x3092;選択すると、インデックスとクエリ アナライザーのオプションが表示されます。

アナライザー リストは、Elasticsearch と互換性のあるアナライザーのコレクションです。 アナライザーを選択するときは、アナライザーがいつ、どのようなデータに対して動作するかを考慮する必要があります。

インデックス アナライザーは、検索コレクションに追加されたデータに対して処理を実行します。 製品がインデックスに追加されると、アナライザーを通過し、フィールド ブースティング レコードに関連付けられたフィールドの製品データが正規化されます。 フィールド データを正規化する方法は、以下で説明するように、アナライザーの設定に基づいています。

クエリ アナライザーは検索クエリに対して処理を実行します。 フロントエンド ユーザーが検索を入力すると、このクエリはすでにインデックスされているデータに対して正規化されます。

注記

インデックス作成とクエリに異なるタイプのアナライザーを混在させることは非常に強力ですが、処理されるデータがさまざまなタイプを処理できるように構造化されていない場合は、予期しない結果が生じることもあります。

以下は標準プラットフォーム アナライザーのリストです。 インデックスとクエリは同じですが、それらが処理するデータは変更されます。

注記

現在、どのアナライザーも数値正規化をサポートしていません。 1/2 または 0.5 はそれぞれ 1/2 と 0.5 のままです。

#### **IscIndexAnalyzer** <a href="#ellvrh1xljfd" id="ellvrh1xljfd"></a>

これは標準のインデックス アナライザーです。 何も設定していない場合は、インデックス作成中にフィールドを処理するために使用されます。 また、データから HTML も削除されます。

**Processing done on data**: 標準/空白の分割、小文字化、同義語の置換、ストップワードの削除、単語の語幹処理、次元の正規化。

**例:**

* 'Hello, world! How are you DOING 2day?' -> **\['hello', 'world', 'how', 'you', 'do', '2dai']**
* '\<h1>Header\</h1>\<p>This is a paragraph.\</p>' -> **\['header', 'paragraph']**
* 'United States of America USA United States Totally Different Text' -> **\['usa', 'usa', 'usa', 'usa', ]**
* 'United Manager Stemming Day today reading reader Helloing' -> **\['unit'、'manag'、'stem'、'dai'、'todai'、'read'、'reader'、'hello']**
* 'ft inch yards miles meter milli centi kilo mi2 yd2 in2 pounds' -> **\['foot', 'inch', 'yard', 'mile', 'meter', 'millimeter', 'centimeter', 'kilometer', 'square', 'mile', 'square', 'yard', 'square', 'inch', 'pound']**

#### **IscQueryAnalyzer** <a href="#id-2bkp11bnrbjt" id="id-2bkp11bnrbjt"></a>

これは IscIndexAnalyzer と同じですが、HTML を削除しません。

**Processing done on data:**&#x6A19;準/空白の分割、小文字化、同義語の置換、ストップワードの削除、単語のステミング、次元の正規化。

**例:**

* 'Hello, world! How are you DOING 2day?' -> **\['hello', 'world', 'how', 'you', 'do', '2dai']**
* '\<h1>Header\</h1>\<p>This is a paragraph.\</p>' -> **\['h1', 'header', 'h1', 'p', 'paragraph', 'p']**
* 'United States of America USA United States Totally Different Text' -> **\['usa', 'usa', 'usa', 'usa', ]**
* 'United Manager Stemming Day today reading reader Helloing' -> **\['unit', 'manag', 'stem', 'dai', 'todai', 'read', 'reader', 'hello']**
* 'ft inch yards miles meter milli centi kilo mi2 yd2 in2 pounds' -> **\['foot', 'inch', 'yard', 'mile', 'meter', 'millimeter', 'centimeter', 'kilometer', 'square', 'mile', 'square', 'yard', 'square', 'inch', 'pound']**

#### **IscLowercaseAnalyzer:** <a href="#id-4d34og8" id="id-4d34og8"></a>

このアナライザーは空白で分割し、文字を小文字にします。

**Processing done on data:**&#x7A7A;白の小文字化

**例:**

* 'Hello, world! How are you DOING 2day?' -> **\['hello', 'world!', 'how', 'are', 'you', 'doing', '2day?']**
* '\<h1>Header\</h1>\<p>This is a paragraph.\</p>' -> **\['\<h1>header\</h1>\<p>this', 'is', 'a', 'paragraph.\</p>']**
* 'United States of America USA United States Totally Different Text' -> **\['united', 'states', 'of', 'america', 'usa', 'united', 'states', 'totally', 'different', 'text']**
* 'United Manager Stemming Day today reading reader Helloing' -> **\['united', 'manager', 'stemming', 'day', 'today', 'reading', 'reader', 'helloing']**
* 'ft inch yards miles meter milli centi kilo mi2 yd2 in2 pounds' -> **\['ft', 'inch', 'yards', 'miles', 'meter', 'milli', 'centi', 'kilo', 'mi2', 'yd2', 'in2', 'pounds']**

#### **IscStandardLowercaseAnalyzer:** <a href="#id-2s8eyo1" id="id-2s8eyo1"></a>

このアナライザーは、標準的な小文字化を実行し、英数字以外の文字を削除します。

**Processing done on data:**&#x6A19;準の小文字化

**例:**

* 'Hello, world! How are you DOING 2day?' -> **\['hello', 'world', 'how', 'are', 'you', 'doing', '2day']**
* '\<h1>Header\</h1>\<p>This is a paragraph.\</p>' -> **\['h1', 'header', 'h1', 'p', 'this', 'is', 'a', 'paragraph', 'p']**
* 'United States of America USA United States Totally Different Text' -> **\['united', 'states', 'of', 'america', 'usa', 'united', 'states', 'totally', 'different', 'text']**
* 'United Manager Stemming Day today reading reader Helloing' -> **\['united', 'manager', 'stemming', 'day', 'today', 'reading', 'reader', 'helloing']**
* 'ft inch yards miles meter milli centi kilo mi2 yd2 in2 pounds' -> **\['ft', 'inch', 'yards', 'miles', 'meter', 'milli', 'centi', 'kilo', 'mi2', 'yd2', 'in2', 'pounds']**

#### **IscNgramAnalyzer:** <a href="#id-17dp8vu" id="id-17dp8vu"></a>

Ngram 処理は単語を分割し、検索中の部分一致に役立ちます。

Ngram Analyzer は、フィールドの単語を部分トークンに変更して、フロントエンド検索中にドキュメント/製品/カテゴリ/コンテンツへのより関連性の高いヒットをトリガーします。

**Processing done on data:** Ngram トークン化と小文字化。Ngram\
設定を構成して、単語の分割方法を変更できます。

**Settings: SearchIndexSettings**

* MinimumNgramLength – トークンが分割される最小値。
* MaximumNgramLength – トークンを分割する最大値。

単語が長くなると、作成されるデータも多くなり、インデックスによって使用されるメモリが増加します。

**例:**

**例:最小: 5 | 最大: 8**

'Hello, world! How are you DOING 2day?' -> **\['hello', 'world', 'world!', 'orld!', 'doing', '2day?']**

**例:最小: 3 | 最大: 4**

'United States of America USA United States Totally Different Text' -> **\['uni', 'unit', 'unite', 'nit', 'nite', 'nited', 'ite', 'ited', 'ted', 'sta', 'stat', 'state', 'tat', 'tate', 'tates', 'ate', 'ates', 'tes', 'ame', 'amer', 'ameri', 'mer', 'meri', 'meric', 'eri', 'eric', 'erica', 'ric', 'rica', 'ica', 'usa', 'uni', 'unit', 'unite', 'nit', 'nite', 'nited', 'ite', 'ited', 'ted', 'sta', 'stat', 'state', 'tat', 'tate', 'tates', 'ate', 'ates', 'tes', 'tot', 'tota', 'total', 'ota', 'otal', 'otall', 'tal', 'tall', 'tally', 'all', 'ally', 'lly', 'dif', 'diff', 'diffe', 'iff', 'iffe', 'iffer', 'ffe', 'ffer', 'ffere', 'fer', 'fere', 'feren', 'ere', 'eren', 'erent', 'ren', 'rent', 'ent', 'tex', 'text', 'ext']**

**例:最小: 5 | 最大: 6**

'United States of America USA United States Totally Different Text' -> **\['unite', 'united', 'nited', 'state', 'states', 'tates', 'ameri', 'americ', 'meric', 'merica', 'erica', 'unite', 'united', 'nited', 'state', 'states', 'tates', 'total', 'totall', 'otall', 'otally', 'tally', 'diffe', 'differ', 'iffer', 'iffere', 'ffere', 'fferen', 'feren', 'ferent', 'erent']**

#### &#x20;<a href="#id-26in1rg" id="id-26in1rg"></a>

#### **IscDimensionalAnalyzer** <a href="#ha6yn9xf004" id="ha6yn9xf004"></a>

注記

Elasticsearch バージョン 7.10 では、検索用語の小数部がサポートされています。 [Elasticsearch v7 - Dimensional Analyzer とFractional Number Search](https://support.optimizely.com/hc/en-us/articles/17755489847821)を参照してください。

ディメンション アナライザーは、特定の用語を特定の形式にのみ正規化するため、状況に非常に適しています。 これにより、マッピング全体のすべての値が見つかったときに常に同じになるため、一致が容易になります。

**Processing done on data:**&#x7A7A;白の小文字化と次元の正規化。 (Elasticsearch バージョン 7 で追加された分数正規化)

**例:**

* ‘1/2 in' -> **\['1/2’, 'inch']**
* ‘1/2 0.5 1.5 3/4 2-1/2 1.75 10/20’ -> **\['1/2', '0.5', '1.5', '3/4', '2-1/2', '1.75', '10/20']** with **Elasticsearch version 5, \['1/2', '1/2', '1-1/2', '3/4', '2-1/2', '1-3/4', '10/20']** with **version 7**
* 'EMT Electrical Metallic Tubing 1/2 in White Conduit 10 ft' -> **\['emt', 'electrical', 'metallic', 'tubing', '1/2', 'inch', 'white', 'conduit', '10', 'foot']**
* '\<h1>Header\</h1>\<p>This is a paragraph.\</p>' -> **\['\<h1>header\</h1>\<p>this', 'is', 'a', 'paragraph.\</p>']**
* 'United States of America USA United States Totally Different Text' -> **\['united', 'states', 'of', 'america', 'usa', 'united', 'states', 'totally', 'different', 'text']**
* 'United Manager Stemming Day today reading reader Helloing' -> **\['united', 'manager', 'stemming', 'day', 'today', 'reading', 'reader', 'helloing']**
* 'ft inch yards miles meter milli centi kilo mi2 yd2 in2 pounds' -> **\['foot', 'inch', 'yard', 'mile', 'meter', 'millimeter', 'centimeter', 'kilometer', 'square', 'mile', 'square', 'yard', 'square', 'inch', 'pound']**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.dxable.com/optimizely/configured-commerce/optimizely-configured-commerce/search/elasticsearch-types-and-index-query-analyzers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
