Gravatar for michael.sullivan@7summitsinc.com

Question by garuda, Aug 23, 2016 2:41 PM

custom fields disappear from field set when re-indexed

I am a dev on a team working on a sitecore multi-site setup. My Coveo search broke, and I can't get it working on my local instance. I imported the field set and applied, and then the fields show up correctly in the field set list. I compiled the code affected (as mentioned in the import / apply) and then checked the field set. the fields were still there. I then re-indexed. My search still does not work, and when I look at the field set, all of the custom fields have disappeared…. No idea why!

Gravatar for michael.sullivan@7summitsinc.com

Comment by garuda, Aug 23, 2016 2:42 PM

FYI My configs are the same as all the devs whose search still works!

1 Reply
Gravatar for sbelzile@coveo.com

Answer by Sébastien Belzile, Aug 23, 2016 3:34 PM

You are importing a field set in CES? This will of cource not work since C4SC will redefine your field set upon re-indexing.

In other words: this is the expected behavior.

Maybe I do not understand what you are trying to do. I think you may have missed a step in your team's procedures, like a missing configuration file in your Sitecore.

When you say: "as mentioned in the import / apply" => what are you talking about?

Gravatar for michael.sullivan@7summitsinc.com

Comment by garuda, Aug 23, 2016 4:06 PM

First, thanks for your help. The problem started with none of the custom fields showing up in the field set, thus giving us a yellow screen since we were looking for fields that were not indexed. I got an export of the field set from another dev, altered the xml FieldSet Name and Description to align with the index names on my instance (or at least the names that show up in the Field Set listing…)

regarding "as mentioned in the import / apply", when I copied the xml into the form and hit the "apply" button, a message came up on the screen saying I should "Rebuild the sources that use modified items in order for the modifications to take effect". So I did. After doing that I checked and the Field Set was still there with the correct fields. After I re-indexed they had disappeared. I guess I assumed that the purpose of the Field Set was to include custom fields in the indexing along with the OoTB Sitecore template fields.

BTW regarding "Rebuild the sources that use modified items in order for the modifications to take effect" - I was assuming that meant to build/publish the Visual Studio source code for the project.

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 23, 2016 4:13 PM

So is everything OK?

"Rebuild the sources that use modified items in order for the modifications to take effect" => yeah… Coveo for Sitecore works on a "push" model not on a "pull" model like other Coveo source. By rebuilding your source, you have simply overriden the configuration you previously imported manually.

Never rebuild your Sitecore sources from the admin console.

Your custom fields must be defined in your Sitecore configuration if you want them in your field set.

Gravatar for michael.sullivan@7summitsinc.com

Comment by garuda, Aug 23, 2016 5:26 PM

No, still not working…. We have a valid Coveo.searchprovider.config with custom fields defined. However, those fields are not being pulled into the index.

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 24, 2016 7:45 AM

  1. If you look at the showconfig.aspx page, can you see your fields?

  2. Errors in your logs?

  3. Which version of C4SC do you use?

Gravatar for michael.sullivan@7summitsinc.com

Comment by garuda, Aug 24, 2016 9:55 AM

  1. Not sure where this is! (Sitecore or localhost:8081?) I know that in the Coveo console (or whatever localhost;8081 is called…) shows the sitecore items, but only the standard sitecore fields, none of the custom fields that were added in the sitecore templates. However, they are all in the Coveo.SearchProvider.config.
Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 24, 2016 10:16 AM

Ok! I see you are quite new to Sitecore. The showconfig.aspx is a page which allows you see the final configuration used by Sitecore.

In other words, when Sitecore loads, it takes all the files in the config folder, and merges them in a huge config file.

Read this article: https://sitecorecorner.com/2014/09/03/sitecore-admin-pages-cheat-sheet/ and open the showconfig.aspx page. Then, find your fields configuration. Maybe you could ask the help of your team mates to interpret the config.

Gravatar for michael.sullivan@7summitsinc.com

Comment by garuda, Aug 24, 2016 12:38 PM

Not super new, but a front-end dev who hasn't had to deal with Coveo issues before… and yes, the file are shown in showconfig.aspx. At a glance it looks exactly like the fields section from Coveo.SearchProvider.config

not seeing anything in the logs not labelled as normal.

C4SC version = Coveo for Sitecore 81 3.0 (1312)

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 24, 2016 12:46 PM

It might be a problem with your coveoIndexingGetFields pipeline? Is it defined in your configuration?

Do you have all the required processors: https://developers.coveo.com/display/public/SitecoreV4/Understanding+the+coveoIndexingGetFields+and+coveoIndexingGetTemplates+Pipelines

Gravatar for cody.swendrowski@7summitsinc.com

Comment by cswendrowski, Aug 24, 2016 1:27 PM

Hello, I am a teammate of Garuda chiming in to help troubleshoot this.

We are using Coveo for Sitecore 3.0.

In our Coveo.SearchProvider.config, we have fieldmaps defined such as the following:

. . .

These field definitions correctly show up in showConfig.aspx for both of our machines. When Garuda goes to index through Sitecore, he can see all of our Indexes that we have defined. Indexing finds the documents correctly but does not seem to be copying in the defined fields. I have verified that we are using the same .configs (Garuda is using a direct export of my environment via SIM).

Thoughts?

Regards, Cody

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 24, 2016 1:32 PM

So, same Sitecore on both sides. Same CES version?

Using your index browser, can you tell me if your fields are defined on your documents?

Gravatar for cody.swendrowski@7summitsinc.com

Comment by cswendrowski, Aug 24, 2016 1:59 PM

I'll compare our CES versions and let you know what they are.

In my Index Browser, I can properly see the custom fields on my documents after an Index.

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 24, 2016 2:01 PM

In his Index Browser as well?

Gravatar for cody.swendrowski@7summitsinc.com

Comment by cswendrowski, Aug 24, 2016 2:07 PM

I am using CES 7.0 (8047) and he is using 7.0 (8225).

When he views his Index browser, none of his documents have Custom Fields nor do the Custom fields show up in the Field Set under Configuration. The Index operation will, however, create new Indexes (including our custom ones) as well as index documents with the default fields.

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 24, 2016 2:20 PM

OK…

  1. Usually, you should use the CES version which matches your C4SC version. In other words, garuda uses C4SC of June 2016 with the CES of March 2016. This is not a good practice and might be the cause of the bug. He should update his CES to 8388.

  2. You should do the same as well since your CES is older.

  3. Check your C4SC versions as well, they need to match if you want the sharing of your configurations to work.

Tell me if it fixes the problem.

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 24, 2016 2:21 PM

For a list of versions that work together (CES + C4SC): https://developers.coveo.com/display/public/SitecoreV3/Downloads

Gravatar for cody.swendrowski@7summitsinc.com

Comment by cswendrowski, Aug 24, 2016 2:26 PM

We will ensure we are on the same version and retest. Will update once we have results, thanks!

Gravatar for michael.sullivan@7summitsinc.com

Comment by garuda, Aug 24, 2016 4:42 PM

Now the versions are correct. I then reindexed Coveowebindex. None of the custom fields were indexed

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 24, 2016 4:51 PM

You are using the same configuration file? or you copied your fields in the OOTB file?

There are lots of changes in the configuration files between C4SC versions. You cannot take the configuration from a specific version of C4SC, copy it in another and hope for it to work.

Since you all use the same configuration file, there must be a specific Sitecore + C4SC version that you are all using? Is it the case?

Gravatar for michael.sullivan@7summitsinc.com

Comment by garuda, Aug 24, 2016 9:16 PM

yes that is the case. So the client wants us all on their current version, understandably. However, since I had installed a more recent version of CES, when I installed the downgraded version, the service would not start - there was an application error from CES saying a VersionDowngradeDetected

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 25, 2016 7:48 AM

Try uninstalling it and reinstalling the version you need.

Gravatar for michael.sullivan@7summitsinc.com

Comment by garuda, Aug 25, 2016 9:17 AM

That is my point… the version of CES I installed was newer than the one I needed. When I installed the one I needed, it refused to start, as mentioned above. The event viewer showed an application error in CES because it was an older version than had previously been run.

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 25, 2016 9:22 AM

You uninstalled CES completely and then installed the version you needed?

Gravatar for michael.sullivan@7summitsinc.com

Comment by garuda, Aug 25, 2016 9:35 AM

yes. I ran the uninstall for CES, ran the uninstall for search API, then installed the older correct version of CES and the older correct version of searchAPI. Both reported installing successfully. However the CES service would not start, and the error pointed me to the Event Viewer. In looking at Applications under the event viwer, " class CGLFile::VersionWatchdog::VersionDowngradeDetected: Last execution used version 7.0.8388.0, which is greater than current version (7.0.8047.0)"

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 25, 2016 9:37 AM

Could you try deleting you CES configuration? By default C:/CES7. Remove that folder, then retry

Gravatar for michael.sullivan@7summitsinc.com

Comment by garuda, Aug 25, 2016 10:57 AM

I did as you suggested, removed the folder, reinstalled CES / search API, and this time they seem to have started. However, I kicked off a re-index of Coveo_web, master and core 25 minutes ago (using Sitecore Index manager) and it says "Items Added to Index: 0" on all three

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 25, 2016 10:59 AM

  1. Any errors in your logs?

  2. You do have the Sitecore version, C4SC version and CES version your client uses?

Gravatar for michael.sullivan@7summitsinc.com

Comment by garuda, Aug 25, 2016 1:00 PM

When I go to sitecore%20modules/Web/Coveo/Admin/CoveoDiagnosticPage.aspx i have an error under Coveo Search REST Endpoint (). Then in looking at the services, Search API is not running. when I try to start it up, it fails… message "the coveo search API started and then stopped. Some services stop automatically if they are not in use by other services or programs"

And yes, I do have the correct versions

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 25, 2016 1:04 PM

Could you open a new question for this?

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 25, 2016 1:26 PM

Other question here: https://answers.coveo.com/questions/7159/coveo-search-api-started-and-then-stopped

Ask a question