Sitecore - Could not find configuration node: contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster
When I use "sitecore_web_index" for Sitecore.ContentSearch.ContentSearchManager.GetIndex, This happens on the content delivery server instance.
Exception: System.InvalidOperationException Message: Could not find configuration node: contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster Source: Sitecore.Kernel at Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert) at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
The reason for this exception that is because there is no 'syncMaster' index update strategy.
Also, the List Manager was enabled. I must have disable List Manager on a content delivery server.
The configuration file of 'sitecore_list_index'(no sitecore_web_index) use syncMaster index update strategy as below.
Sitecore.ListManagement.Lucene.Index.List.config:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <contentSearch> <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch"> <indexes hint="list:AddIndex"> <index id="sitecore_list_index" type="Sitecore.ContentSearch.LuceneProvider.LuceneIndex, Sitecore.ContentSearch.LuceneProvider"> <param desc="name">$(id)</param> <param desc="folder">$(id)</param> <!-- This initializes index property store. Id has to be set to the index id --> <param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" /> <configuration ref="listManagementSearch/indexConfigurations/listManagementLuceneIndexConfiguration" /> <strategies hint="list:AddStrategy"> <!-- NOTE: order of these is controls the execution order --> <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster" />
I deleted this file and the error was resolved.
Thanks,
- Sitecore Documentation: Configure a content delivery server https://doc.sitecore.net/sitecore_experience_platform/81/setting_up_and_maintaining/xdb/configuring_servers/configure_a_content_delivery_server
- SwitchMasterToWeb.config https://kb.sitecore.net/articles/347205
- SwitchMasterToWeb.config in Sitecore 8.1 Update 2 missing patch for sitecore_list_index - Stack Overflow http://stackoverflow.com/questions/36558603/switchmastertoweb-config-in-sitecore-8-1-update-2-missing-patch-for-sitecore-lis
Azure Search Sample & Xamarin.Forms でアプリ作成
作ってみました。 構成は、Azure Search と Xamarin.Forms だけで他にサーバーは立てていません。 Azure Search が提供する HTTP API を通してデータをやり取りします。 また、Azure Search の方は、ボタン1つで立ち上げられるサンプルデータを利用しています。
動画 Android で:
iOSで:
ソース GitHub: https://github.com/hhyyg/Miso.SearchForms
(プルリクなど大歓迎です。バグもあります。)
Features
Azure Search の機能のうち、Suggest・Filter・Facet・Paging を盛り込みました。
そのほか、以下のものを使用しています。
- Azure Search SDK
- SDK を使わずに HTTP Client の方が良かったかなと思ったり。もう少し薄く使いたかったという意味で。
- Prism
- PCLAppConfig mrbrl/PCLAppConfig: Xamarin.Forms PCL App.Config Manager
- SegmentControl
Azure Search - Sample data source
Azure Search には、不動産のデータのサンプルが用意されています。 7種類の言語が含まれていますが、残念ながら日本語は用意されていません。 SuggestやFacetなど、ある程度の機能が利用できるようにあらかじめインデックスが作成されています。 立ち上げるとすぐに HTTP でアクセスできます。
参照:Azure Search のサンプルデータ | ブチザッキ
GitHubの方には、自分の Azure Search の接続情報がコミットされています。 本当はよくないですが、フリープランのため課金は大したことなく、いつでも無効にできるためサンプルに入れました。なのですぐ試せると思います。
Other Sample
Azure Search と Xamarin のサンプルを探したところ、次の2つを発見しました。
Sample 1
これは、Xamarin.Android と Azure Search のサンプルです。 Azure Search の方は、サンプルの不動産データを使用しています。 また、このアプリを使った解説動画が Channel9 の方にあります。→ - The Xamarin Show 9: Azure Search with Liam Cavanagh | The Xamarin Show | Channel 9
Sample 2
こちらは、Xamarin.Forms と、Azure Search のサンプルです。 Azure Search のデータは、独自のものが定義されています。(ですので、自分で立ち上げるときは Azure Search の設定等を行う必要あり)