FetchXml Crawling Supported Operations

This article lists the operations that are supported and common issues that might occur when indexing with FetchXml.

Coveo doesn’t run FetchXml queries as is. They’re edited to ensure that the inclusion of CRM fields required to properly generate Coveo system fields. Furthermore, some indexing scenarios require adding filters to queries.

Supported Operations

Non supported operations are mostly related to condition operators. A good rule of thumb to determine whether a given operator is supported or not is whether one can take the inverse of that operator. As an example NotLike and Like, LessEqual and GreaterThan.

Operators

The complete list of FetchXML Condition Operators can be found in the Microsoft documentation.

Not supported operators are:

  • Time operators related to a relative period of time, ex: ThisWeek, ThisFiscalYear.

  • User ID or business ID related operators, ex: EqualBusinessId, EqualUserLanguage.

The table below lists the operators that are supported:

Condition Operator
BeginsWith
Contains
DoesNotBeginWith
DoesNotContain
DoesNotEndWith
EndsWith
Equal
GreaterEqual
GreaterThan
In
LessEqual
LessThan
Like
Mask
NotNull
Null
NotEqual
NotIn
NotLike
NotMask

Common Issues

This issue might happen when using the Fetch XML from a CRM view like `My Active Cases`. These FetchXmls include filters that are related to the user running the query. For example:

<condition attribute="ownerid" operator="eq-userid" />

Since the Coveo connector isn’t the owner of anything in CRM, that kind of query is expected to index nothing.

Filters Indexing Too Many Documents

Coveo sometimes modifies FetchXml queries to include additional Coveo required information. Modifications might apply to filters. An issue in Coveo might modify your first level filter if it includes many sub-filters. In other words, if using more than one filter condition, place your filters one level down.

<filter type="and">
  <condition attribute="modifiedon" operator="ge" value="2018-02-23" />
  <filter type="or">
    <condition attribute="modifiedon" operator="le" value="2018-02-23" />
  </filter>
  <filter type="or">
    <condition attribute="modifiedon" operator="le" value="2018-02-23" />
  </filter>
</filter>

Should be defined as:

<filter type="and">
  <filter type="and">
    <condition attribute="modifiedon" operator="ge" value="2018-02-23" />
    <filter type="or">
      <condition attribute="modifiedon" operator="le" value="2018-02-23" />
    </filter>
    <filter type="or">
      <condition attribute="modifiedon" operator="le" value="2018-02-23" />
    </filter>
  </filter>
</filter>
Recommended Articles