Gravatar for

Question by yonico, Jan 14, 2015 1:48 PM

Result template

Hi - I am trying to customize the default result template and coveo seems to be not finding the field. {{= raw['<%= ToCoveoFieldName("Product Intro Copy", false) %>'] }}

The field exists in sitecore and also appears to be configuration -> Fields. Do I have to do additional work for this? The "" doesnt seems to be helping. What can I do?

    <processor type="Coveo.SearchProvider.Processors.Queries.AddAllFieldsProcessor, Coveo.SearchProviderBase" />
    <!--<processor type="Coveo.SearchProvider.Processors.Queries.AddBasicFieldsProcessor, Coveo.SearchProviderBase" />
        <processor type="Coveo.SearchProvider.Processors.Queries.AddVirtualFieldsProcessor, Coveo.SearchProviderBase" />
        <processor type="Coveo.SearchProvider.Processors.Queries.AddFieldsRelatedToSearchTypeProcessor, Coveo.SearchProviderBase" />-->
Gravatar for

Comment by yonico, Jan 14, 2015 2:26 PM

seems to be working for other types of template and coveo search doesnt find it. The error might be when reading an item that has childrens.

1 Reply
Gravatar for

Answer by Jean-François L'Heureux, Jan 14, 2015 3:01 PM

Is it a new field on your items? If that's the case, did you re-index the items with this field? You can check in the Coveo Administration Tool Index Browser:

  1. Look for an item you expect the field to exist on. Either by searching for its title and/or refining with the facets on the left.
  2. Click the "Details" link under this item. A tabbed section will be displayed under the item.
  3. Click the "Fields" tab.
  4. Using the search box in the upper-right corner of the "Fields" section, search for your field: "productz32xintroz32xcopy".

If the field is not present on your items, you need to re-index your items. Note that the field may be present on the Master or Web source but not the other one. You need to re-index the items for both database/index to be able to use the field in the Page Editor, Page Preview mode and on the published site.

Gravatar for

Comment by yonico, Jan 15, 2015 12:58 PM

it's not a new field.
1- Also see it in the administration tool in the configuration --> fields. 2- when performing the search inside CES, i able to see it but not in the search page 3- appears in fields section. 4- it's there.

for some reason is not included this item in the search web. I can find it in COVEOWEBINDEX when using CES but not in the search page. I also published sitecore. Do you what the item is not displayed? does coveo exclude from showing certain items in results?

Gravatar for

Comment by Jean-François L'Heureux, Jan 15, 2015 1:28 PM

By default, Coveo for Sitecore returns all the fields on the results. One way to have Coveo for Sitecore return only some fields on the results is by changing the default processor of the coveoQueryFieldPipeline configuration element (see Optimizing LINQ Query Performance).

Can you provide the content of your coveoQueryFieldPipeline configuration element please? If it doesn't fit in a comment, please edit your original question to include it there.


Gravatar for

Comment by Jean-François L'Heureux, Jan 15, 2015 1:30 PM

If you changed the default coveoQueryFieldPipeline element configuration, it is normal that your field isn't on the results. You need to add a custom processor to list the fields you want to use manually in the result templates.

Gravatar for

Comment by yonico, Jan 15, 2015 1:44 PM

there are 4 items in CES but appear only 2 items. The field doesnt appear because there is no item. My question was regarding the missing items.

Ask a question