Post that I rebuild the indexes to create the field.
But here is the situation that it didn’t get added into the Indexes of SOLR.
Here is the fix for this issue, hopefully it saves your time and you can jump to the development rather then getting stuck in configuration.
In sitecore 9, there is a term called as “<documentOptions>” which comes into the picture.
When we open the search index config, we can see the sections where we define included and excluded templates, fields etc. are now wrapped with documentOptions tag.
Below is the configuration from Sitecore 9
So here we can see that once we wrap our custom field into documentOptions and rebuild our indexes, field will be added into SOLR.
If it was helpful to all you Sitecore aspirants and saved your time you can thank me by buying me a beer 🙂{:}{:ja}
SOLRに計算フィールドを追加しようとしたときに、Sitecore9でインスタンスを共有したいと思います。
次の構成を追加しました
以下は、9より前のSitecoreバージョンからの構成です。

インデックスを再構築してフィールドを作成することを投稿します。
しかし、これがSOLRのインデックスに追加されなかった状況です。
これがこの問題の修正です。うまくいけば、時間を節約でき、構成にとらわれるのではなく、開発にジャンプできます。
サイトコア9には、「」と呼ばれる用語があります。
検索インデックス構成を開くと、含まれるテンプレートと除外されるテンプレートを定義するセクション、フィールドなどがdocumentOptionsタグでラップされていることがわかります。
以下はSitecore9の構成です

したがって、ここでは、カスタムフィールドをdocumentOptionsにラップしてインデックスを再構築すると、フィールドがSOLRに追加されることがわかります。
Sitecoreの志願者全員に役立ち、時間を節約できた場合は、ビールを購入して感謝することができます🙂
{:}
Leave a Reply