拝啓
以下のSampleをベースに開発してたら、Index の Analyzer が英語版になっていることに気付いた。
ということで、その対処法の備忘録
結論
日本語化をする為、以下の環境変数を設定してから、
- AZURE_SEARCH_QUERY_LANGUAGE = ja-JP
- AZURE_SEARCH_QUERY_SPELLER = ja-JP
- AZURE_SEARCH_ANALYZER_NAME = ja.microsoft
- Query Speller は、まだ日本語版は未対応。今後に期待 spell check
- Analyzer は、ja.lucene も選べるが、実際に使ってみると、PDF 認識で微妙だったのでパス
詳しくは deploy_existing.md
に書いてあった。
You can also customize the search service (new or existing) for non-English searches:
- To configure the language of the search query to a value other than "en-US", run
azd env set AZURE_SEARCH_QUERY_LANGUAGE {Name of query language}
. (See other possible values)- To turn off the spell checker, run
azd env set AZURE_SEARCH_QUERY_SPELLER none
. Consult this table to determine if spell checker is supported for your query language.- To configure the name of the analyzer to use for a searchable text field to a value other than "en.microsoft", run
azd env set AZURE_SEARCH_ANALYZER_NAME {Name of analyzer name}
. (See other possible values)
参考
- default変えたい時とか
- search について
あとがき
deploy_existing.md
に気付くまでは、ソース直接編集しちゃってましたよ