We have upgraded our Sitecore instance from 8 to 9.0.2 version. In one of our component on datasource level we are using query like below.

query:./ancestor-or-self::*[@@templatename='Website']/Local Content/Header/Content Source

On front-end everything is working as expected, but when I saw search logs I am seeing below error multiple times.

ERROR Solr Error : ["undefined field query"] - Query attempted: [query:(.\/ancestor\-or\-self)].

If I am removing component from page then this error is not showing in search logs. Does anything needs to be updated in query syntax.

Please help me to resolve this error.

1 Answer 1


It looks like a known issue and you can find the solution here in this link.


The root cause of this issue is that all queries that start from the query: or local: prefix lead to generating the query to Solr. However, a request to the index during resolving the data source for the SXA component must not be sent.

You can find this in this article.

For Sitecore XP 9.0.2, download and install the patch compatible with the affected Sitecore XP and SXA product version found on this page:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.