Gravatar for corrac@paragon-inc.com

Question by Cris Corra, Aug 5, 2014 10:32 AM

How can I get custom sort fields to show up in the Sort Component properties (Coveo for Sitecore)?

I've followed these instructions but I cannot get new fields defined in the FieldMap section to show up in the available template/fields list in the sort component. Other template/fields combinations that are not defined in the FieldMap section ARE showing up there. Am I missing something? I've reset the fieldset in Coveo Admin, and also rebuilt the entire master index. It's still not working.

https://developers.coveo.com/display/public/SC201407/Inserting+and+Customizing+a+Sort+Component

-Cris Corra

1 Reply
Gravatar for vseguin@coveo.com

Answer by Vincent Séguin, Aug 5, 2014 2:51 PM

Hi Cris,

How are your fields defined in the field map? Your fields need to be defined as sortable to work. Example :

Basically, we scan the templates to show only the fields recognized as Date, Double and Long, AND the field defined as sortable in the field map.

Let me know if it answers your question.

Gravatar for corrac@paragon-inc.com

Comment by Cris Corra, Aug 5, 2014 4:34 PM

Thanks for your reply Vincent! I didn't see that information in the documentation anywhere (that date, long, and double fields are sortable by default). Maybe I missed it?

Here is one of my custom text field definitions in the config file:

Gravatar for vseguin@coveo.com

Comment by Vincent Séguin, Aug 5, 2014 4:37 PM

We just added it in the documentation to make sure it's clear.

Your field configuration doesn't work because it is case sensitive. It should be isSortable, isFacet, isMultiValue etc.

Adjust this, save and rebuild your index. Then you should see your field appears. Let me know!

Gravatar for tom.prebish@paragon-inc.com

Comment by mothertraintom, Aug 6, 2014 5:22 PM

Vincent, I'm working w/Cris on this issue. Here is the exact entry in my Coveo.SearchProvider.config file:

fieldType fieldName="Media Title" isSortable="true" isFacet="false" isMultiValue="false" includeForFreeTextSearch="false" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework"

And when i look at Fields configuration of the Master index in the Coveo admin (since i can't upload a screenshot): Name: fmediaz32xtitle1833 Type: String Metadata Name: Media Title Default Value: empty Option: Checked fields are: Include for field queries, Allow to sort query results by this field, Set as display field

Yet, when i select the field dropdown in my Coveo Sort View, Media Title does not appear.

Thanks, Tom

Gravatar for vseguin@coveo.com

Comment by Vincent Séguin, Aug 6, 2014 6:05 PM

Hi Tom,

I've looked into it and it seems it doesn't work indeed. I suggest you open a support case. We'll take a look into it as quickly as possible.

Thank you!

Gravatar for vseguin@coveo.com

Comment by Vincent Séguin, Aug 7, 2014 7:55 AM

Hi Tom,

I've looked into it and the fields configured in your Coveo.SearchProvider.config will appear under the template 'Configured Fields'. We will make sure to document it :)

Gravatar for vseguin@coveo.com

Comment by Vincent Séguin, Aug 7, 2014 8:33 AM

Hi Cris,

I've looked into it and the fields configured in your Coveo.SearchProvider.config will appear under the template 'Configured Fields' in the template/fields list. We will make sure to document it :)

Gravatar for corrac@paragon-inc.com

Comment by Cris Corra, Aug 7, 2014 9:00 AM

Actually, I do have all of the correct cases:

Gravatar for tom.prebish@paragon-inc.com

Comment by mothertraintom, Aug 7, 2014 11:00 AM

Vincent,

Can you clarify "will appear under the template 'Configured Fields'". I'm not sure what template you are referring to or what Configured Fields is.

Tom

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 7, 2014 1:17 PM

In order to select a field you need to select a template first. The list of field is generated from the template you pick. In the template list, there is one template called 'Configured Fields' that contains the fields from the Coveo.SearchProvider.config files.

Gravatar for vseguin@coveo.com

Comment by Vincent Séguin, Aug 7, 2014 1:30 PM

Configured Fields is a fake template : the fields that will appear under this template are those that will be defined as isSortable in your Coveo.SearchProvider.config file, just like Sébastien said.

Gravatar for tom.prebish@paragon-inc.com

Comment by mothertraintom, Aug 8, 2014 1:19 AM

Thank you for clarifying, everything now works as expected.

Ask a question