Antony
Antony

Reputation: 976

Marklogic - wildcarded search not working for slash (/)

I am using the below xquery for partial search ,The does not work when the string coming with slash (/) .

The Query should return the URI based on Search.

Xquery:

cts:search(fn:collection($collectionName),

    cts:and-query((

    cts:element-attribute-value-query(xs:QName("element"),xs:QName("type"),'per'),

    cts:element-value-query(xs:QName("attri"),'*Olliffe Matthew 17/2/3*',("wildcarded","whitespace-sensitive","case-insensitive"))

)))

Upvotes: 0

Views: 66

Answers (1)

mg_kedzie
mg_kedzie

Reputation: 437

Your code works in MarkLogic 9.0-1.1 console, for me variable $collectionName is "coll1".

cts:search(fn:collection("coll1"),
                                 cts:and-query((

                                 cts:element-attribute-value-query(xs:QName("element"),xs:QName("type"),'per'),

                                cts:element-value-query(xs:QName("attri"),'*Olliffe Matthew 17/2/3*',("wildcarded","whitespace-sensitive","case-insensitive"))

                        )))

Upvotes: 1

Related Questions