Hi,

I would have expected that doing a wildcard-enabled search for "10JUN2009*" 
would return two results, but I could be wrong. Can you tell which wildcard 
indexes are enabled? Is trailing wildcard index enabled?

And wildcard can behave in some unexpected way, they tend not to match against 
word-boundaries. I am not sure how a minus sign is treated in a value search. 
One of the document on the MarkLogic site should contain some details about 
this, but I forgot which one.

Just my quick two cents. HTH!

Kind regards,
Geert

>


Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.


> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Glidden, Douglass A
> Sent: woensdag 10 juni 2009 15:27
> To: [email protected]
> Subject: [MarkLogic Dev General] element-value-query vs.
> element-attribute-value-query behavior difference
>
> Hi,
>
> I've run into an odd difference in the behavior of
> cts:element-attribute-value-query() as oppposed to
> cts:element-value-query().  (To tell the truth, neither one
> of them behaves exactly like I would prefer, but for now I'm
> just trying to figure out what is making the difference
> between them.)  Assume the following four sample documents
> are in the database:
>
> *     <testNode insertDate="10JUN2009" />
> *     <testNode insertDate="10JUN2009-0849" />
> *     <testNode>
>     <insertDate>10JUN2009</insertDate>
> </testNode>
> *     <testNode>
>     <insertDate>10JUN2009-0849</insertDate>
> </testNode>
>
> Wildcard searches are enabled, but pretty much all other
> settings for the Documents database are default.
>
> Executing this query:
>
>       cts:search(/testNode,
> cts:element-value-query(xs:QName("insertDate"), "10JUN2009*"))
>
> returns a single result, as expected:
>
>       <testNode>
>           <insertDate>10JUN2009</insertDate>
>       </testNode>
>
> On the contrary, executing this query:
>
>       cts:search(/testNode,
> cts:element-attribute-value-query(xs:QName("testNode"),
> xs:QName("insertDate"), "10JUN2009*"))
>
> returns an empty sequence, which is inconsistent with the
> behavior of the element-value-query.  Further complicating
> matters, executing an otherwise identical, case-insensitive
> version of the above query:
>
>       cts:search(/testNode,
> cts:element-attribute-value-query(xs:QName("testNode"),
> xs:QName("insertDate"), "10jun2009*"))
>
> returns a single result:
>
>       <testNode insertDate="10JUN2009" />
>
> which is what I expected the first query to return!
>
> Note that if I remove the trailing wildcard, the
> case-sensitive and case-insensitive versions both return the
> same result, so the discrepancy seems to exist only for an
> element-attribute-value-query (or
> element-attribute-word-query) that combines case-sensitivity
> with a wildcard.
>
> I'd appreciate any ideas you can throw out.
>
> Thanks,
>
> Doug Glidden
> Software Engineer
> The Boeing Company
> [email protected]
>
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to