<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # search_analyzer (搜索分析器) 通常情況下,我們在搜索和創建索引時使用的是同一分析器,以確保我們搜索是的詞根與倒排索引中的詞根擁有相同的格式。 但是有時我們又會有意識的在搜索時使用不同的分析器,例如使用**?[edge_ngram](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/analysis-edgengram-tokenizer.html)?**解析器自動解析。 默認情況下,查詢將會使用字段映射時定義的分析器,但也能通過**search_analyzer**?設置來進行修改: | `curl -XPUT?``'localhost:9200/my_index?pretty'`?`-H?``'Content-Type: application/json'`?`-d'` `{` `"settings"``: {` `"analysis"``: {` `"filter"``: {` `"autocomplete_filter"``: {?``#1` `"type"``:?``"edge_ngram"``,` `"min_gram"``: 1,` `"max_gram"``: 20` `}` `},` `"analyzer"``: {` `"autocomplete"``: {` `"type"``:?``"custom"``,` `"tokenizer"``:?``"standard"``,` `"filter"``: [` `"lowercase"``,` `"autocomplete_filter"` `]` `}` `}` `}` `},` `"mappings"``: {` `"my_type"``: {` `"properties"``: {` `"text"``: {` `"type"``:?``"text"``,` `"analyzer"``:?``"autocomplete"``,?``#2` `"search_analyzer"``:?``"standard"`?`#3` `}` `}` `}` `}` `}` `'` `curl -XPUT?``'localhost:9200/my_index/my_type/1?pretty'`?`-H?``'Content-Type: application/json'`?`-d'` `{` `"text"``:?``"Quick Brown Fox"`?`#4` `}` `'` `curl -XGET?``'localhost:9200/my_index/_search?pretty'`?`-H?``'Content-Type: application/json'`?`-d'` `{` `"query"``: {` `"match"``: {` `"text"``: {` `"query"``:?``"Quick Br"``,?``#5` `"operator"``:?``"and"` `}` `}` `}` `}` `'` | | 1 | **Analysis?**設置為傳統的?**autocomplete?**分析器 | | 2 3 | **text**?字段使用?**autocomplete?**分析器進行索引,但是使用**standard**?分析器進行搜索。 | | 4 | 這個字段將使用以下詞根進行索引:[?`q`,?`qu`,?`qui`,?`quic`,?`quick`,?`b`,?`br`,?`bro`,?`brow`,?`brown`,?`f`,?`fo`,?`fox`?] | | 5 | 查詢搜索將同時使用兩個詞根:[?`quick`,?`br`?] | 可以通過查看?**[Index time search-as-you- type](https://www.elastic.co/guide/en/elasticsearch/guide/2.x/_index_time_search_as_you_type.html)**?獲得此例的完整解釋。 注意 同一索引相同名字的字段**search_analyzer?**設置必須相同。他的值可以通過?**[PUT mapping API](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/indices-put-mapping.html "Put Mapping")**?進行覆蓋修改。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看