Gravatar for matt.dinovo@avanade.com

Question by swiftus, Mar 16, 2015 6:09 PM

ToCoveoFieldName and mystery fields

When I use ToCoveoFieldName in my layout I get a field @fcategory60016 however the 60016 number doesn't exist anywhere in my index. They are all 49491 (i.e. @fcategory49491). I can't figure out why the help resolves all of the fields to the 60016 number. Only thing I can think of is that I'm on a developer workstation hitting a remote Coveo front end. Is there some magic I need to do to make sure my field names are resolved correctly? Thanks!

2 Replies
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Mar 16, 2015 6:18 PM

The number at the end of the field names is computed using the SourceName of your index. On your developer Sitecore instance, you should configure each index <SourceName> node in the Coveo.SearchProvider.config file to match the names of the CES sources that are already created on the remote CES server (see Changing the Name of Sources Created in the Coveo Index).

Gravatar for vseguin@coveo.com

Comment by Vincent Séguin, Mar 16, 2015 7:26 PM

Just to add, by default the SourceName is dependant on your index's name (master, web etc.). So the field names will not be the same depending if you're searching on master or web, for instance.

Gravatar for anya.mudry@alpa.org

Comment by searchdev, Apr 7, 2015 4:58 PM

I am having the same problem with ToCoveoFieldName resolving to an incorrect field name with the wrong numerical postfix (the field does not exist in the index). My Coveo.SearchProvider.config index node contains a SourceName that matches the CES source. How can I fix this problem?

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Apr 7, 2015 5:20 PM

Does all of your <index> nodes have the <SourceName> element configured to the correct values? By default, there are many index nodes for the web, master and core indexes. All of them should be configured correctly.

Gravatar for anya.mudry@alpa.org

Comment by searchdev, Apr 7, 2015 5:22 PM

OK, I found the reason for the problem - the incorrect Field Set was assigned to the source. I corrected it in the CES Administration Tool and now all is well.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Apr 7, 2015 5:29 PM

You shouldn't modify this in the CES source as it will be overridden the next time Coveo for Sitecore will index an item in that source.

After modifying the <SourceName> elements, you should rebuild the Sitecore indexes. Rebuilding will trigger the synchronization of the fields sets and sources between Coveo for Sitecore and CES.

Gravatar for anya.mudry@alpa.org

Comment by searchdev, Apr 7, 2015 9:24 PM

Yup, after adding the element I rebuilt the indices. Still did not solve my issue (0 results when a certain index was queried from a search page). The reason no results were returned was that the query specified conditions for fields that did not exist in that source. Only when I noticed that the incorrect Field Set was selected for that source, corrected it, then rebuilt the index, my issue was resolved. ToCoveoFieldName was working correctly. For more info on Field Sets refer to http://onlinehelp.coveo.com/en/ces/7.0/administrator/modifyingthefieldsetusedbya_source.htm.

Gravatar for anya.mudry@alpa.org

Answer by searchdev, Apr 7, 2015 5:24 PM

Check in the CES Administration Tool if the correct Field Set was assigned to your source (Index/Sources and Collections/Fields).

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Apr 7, 2015 5:31 PM

Coveo for Sitecore overrides the source field set at each indexing operation. Modifying it manually in CES is not a good idea as it will be overridden at the next indexing operation.

Gravatar for anya.mudry@alpa.org

Comment by searchdev, Apr 7, 2015 9:14 PM

Please refer to the Coveo documentation at http://onlinehelp.coveo.com/en/ces/7.0/administrator/modifyingthefieldsetusedbya_source.htm which discusses how you can change the Field Set for a source.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Apr 8, 2015 10:21 AM

As I said, Coveo for Sitecore is taking care of updating the source field set automatically. If it is not doing it, there might be a problem in your configuration/setup.

Can I ask for your product versions?

Ask a question