Gravatar for steve.anderson@rbaconsulting.com

Question by Steve Anderson, Jun 25, 2015 11:59 AM

How to remove @sys fields from search results.

We are using a Coveo for Sitecore 7 (7.0 x64 Build 7599.0) index side by side with Lucene (which contains the default 'sitecoremasterindex') index and etc. In the Coveo index, we have a number of fields that we have setup as facets, computed fields and etc. For the most part, things are working as expected except for a few erroneous search results. Many of these are coming from the fact that Coveo creates some @sys fields for various fields and will include those fields if they are contained in the search query.

An example is when the user searches for the word 'Index' (#q=index), we get hits because there are fields like:
@sysfolders. @sysprintableuri, @syssource, @sysuri that contain a sting like 'myindexmasterindex-custom' that contain the searched word.

Thus, I have (2) questions:

  1. How does one remove search results for matches against these '@sys' fields?
  2. Is that the same process to remove any other field from the search results for all of the normal, user fields (ie. @fdatasource12345).

Thanks!

1 Reply
Gravatar for slangevin@coveo.com

Answer by Simon, Jun 26, 2015 11:10 AM

Hi,

The Coveo system fileds (external fields), cannot be modified in the Coveo Search Provider config file. You can find these fields in the Coveo Administration Tools >> Configuration >> Fields menu.

Simply click on the field set you wish to modify and select the system field menu. Then you can use the un-check the Free Text Queries check box to disable the free text search on that field.

Repeat the process for all field sets of your Sitecore instance.

Cheers,
Simon

Gravatar for steve.anderson@rbaconsulting.com

Comment by Steve Anderson, Jun 26, 2015 2:13 PM

Thank you.

So, that works for the Coveo system fields.

How do I handle modifying the behavior for some of my custom fields? Specifically, I have a few fields ( fdescription12345, and foverview12345) that are configured in the Coveo.SearchProvider.config file to be included, but are not being used during querying.

fieldName="description" includeForFreeTextSearch="yes"

When I view these fields in the 'EditFieldSet.aspx' page, they are NOT checked to be used for Free Text Queries.

Can these fields be enabled for Free Text Queries?

Thanks!

Gravatar for slangevin@coveo.com

Comment by Simon, Jun 26, 2015 3:53 PM

For your custom fields in Sitecore, you can use the field map section, so yes:

fieldName="description" includeForFreeTextSearch="yes"

It might need a rebuild however so if you did not rebuild the index, you might not see it checked in the Admin Tool

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 26, 2015 5:13 PM

"yes" is not a valid value for the attributes of this section. The accepted values are "true" or "false". So you need to configure your fields this way:

<fieldMap type="Coveo.SearchProvider.CoveoFieldMap, Coveo.SearchProvider">
  ...
  <fieldNames hint="raw:AddFieldByFieldName">
    ...
    <fieldType fieldName="description" includeForFreeTextSearch="true" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" />
  </fieldNames>
  ...
</fieldMap>
Gravatar for slangevin@coveo.com

Comment by Simon, Jun 26, 2015 5:14 PM

Oh right thank you for the correction

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 26, 2015 5:15 PM

After modifying the file, a rebuild of the indexes is needed to update the fields and documents in the CES index.

Gravatar for steve.anderson@rbaconsulting.com

Comment by Steve Anderson, Jun 29, 2015 4:13 PM

wow. Can't believe I missed that. Merci!! You guys are the best!

Ask a question