Sukesh
Sukesh

Reputation: 99

Ignore an element in cts:search having blank value

I am performing cts:search using a particular document element. But when the element has no value/blank in DB, it is returning wrong result. So I want to ignore the search if the element value is blank.

Upvotes: 0

Views: 246

Answers (1)

grtjn
grtjn

Reputation: 20414

You can use a cts:element-value-query wrapped in a cts:not-query for that purpose. Something like:

cts:not-query(
  cts:element-value-query(xs:QName("my-elem"), "")
)

HTH!

Upvotes: 1

Related Questions