[MarkLogic Dev General] Query with cts:element-word-query() and three uppercase words

Will Thompson wthompson at jonesmcclure.com
Fri Mar 23 09:28:18 PDT 2012


Mariano,

I know there was a bug when dealing with element-word-queries with a 3 or more word phrase. I think it was fixed in 5.0-3,  but I'm not sure which 4.2 release got it. You might want to contact support.

-Will

From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Mariano Grau Calín
Sent: Friday, March 23, 2012 1:20 AM
To: general at developer.marklogic.com
Subject: [MarkLogic Dev General] Query with cts:element-word-query() and three uppercase words



Hi all,

I'm using MarkLogic Server 4.2-7 and the cts:element-word-query() function returns less documents than cts:element-value-query() when i write three uppercase words. This behaviour not happen in version 3.2.

By example, this queries returns four documents:

(: 4 results with cts:element-value-query :)
cts:search(collection('type/pages')/DOC/PUBLICADO, cts:and-query((
    cts:element-value-query(xs:QName("FECHAPUB"), "2012-03-17"),
    cts:element-value-query(xs:QName("PUBLICACION"), "FIESTAS DE BENAHADUX")
  ))
)

And this one returns only one!!!
(: 1 result with cts:element-word-query and three uppercase words :)
cts:search(collection('type/pages')/DOC/PUBLICADO, cts:and-query((
    cts:element-value-query(xs:QName("FECHAPUB"), "2012-03-17"),
    cts:element-word-query(xs:QName("PUBLICACION"), "FIESTAS DE BENAHADUX")
  ))
)

However, if i run this queries also four documents:
(: 4 result with cts:element-word-query and lowercase :)
cts:search(collection('type/pages')/DOC/PUBLICADO, cts:and-query((
    cts:element-value-query(xs:QName("FECHAPUB"), "2012-03-17"),
    cts:element-word-query(xs:QName("PUBLICACION"), "fiestas de benahadux")
  ))
)
(: 4 results with cts:element-word-query and two uppercase words :)
cts:search(collection('type/pages')/DOC/PUBLICADO, cts:and-query((
    cts:element-value-query(xs:QName("FECHAPUB"), "2012-03-17"),
    cts:element-word-query(xs:QName("PUBLICACION"), "FIESTAS DE")
  ))
)

Regards,

Mariano Grau
mgrau @ grupojoly.com
Dpto. Sistemas
Grupo Joly

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120323/8709e86c/attachment.html 


More information about the General mailing list