I created a new custom index named CUSTOM_SERVICES_INDEX
using this command:
C:\solr\solr-7.2.1\bin>solr.cmd create -c [custom index name]
(cmd as administrator) then I created the config file named Sitecore.ContentSearch.Solr.Index.Master.<NAME>.config
in C:\inetpub\wwwroot\killerbarber.sc\App_Config\Include
where killerbarber
is root app folder. I did few changes there such as custom index name, field and template Ids that I wanted my index work wit:
Next step, go to Sitecore > Control Panel > Indexing Manager > Select your new custom index you just created > Build/Rebuild. You will get the next error: undefined field _indexname
Some workarounds suggest that you have to verify configuration file and validate custome index name, field and template Ids you added on it. All of them are totally fine. Since there is a 400 status code in the error description, I related this issue with some api call and I went to the config file and copied and pasted the URLs that are detailes there:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
In my case, none of them worked so I was pretty sure that was the root cause but the others file from other index already created have the same values so that was no the root cause at all. So, this get fixed when you Populate Solr Managed Schema (same place than Indexing Manager). Wait, a new error showedup, this one:
Do not be scared, you will find a lot of fix that required a lot of changes such as change strategy syncMaster to intervalAsyncMaster or copy other index forder that rename it and so on.
This is my fix, go to schema file and change uniqueKey field to any other (_uniqueid
in my case). Then, restart Solr Service and, finally, restart IIS. After this you can build the custom index without any problem:
Question, is there other workaround for this? My fix worked but maybe there is other simplier than this.
Regards