[MarkLogic Dev General] phrase search punctuation snafu (in attribute)

Mike Sokolov sokolov at ifactory.com
Thu Nov 2 07:14:39 PST 2006


[Aside re: searching the archives of this list:
Does anyone else think Mark Logic ought to be providing a search 
interface for its own public mailing lists?  Kick me if I'm crazy, but 
it just seems like it might be a nice show piece.  Did I miss it?]

I was looking for an answer to the following conundrum (new in 3.1.-3.1):

I have nodes that look like:

<illustration 
image-doc-uri="/opr/t0001/e0001/images/t0001.aaron-hank.01.jpg">
 ...

When I execute the search:

cts:search (//illustration,
      cts:element-attribute-word-query (xs:QName("illustration"), 
xs:QName("image-doc-uri"),
      "t0001.aaron-hank.01.jpg"))

I get no results! Which seems wrong to me.

Expanding on this, I tried replacing the text "t0001.aaron-hank.01.jpg" 
with other things, with the results indicated:

"aaron-hank"  MATCHES
"t0001"  MATCHES
"t0001.aaron-hank" NO MATCH

Thinking there might be a punctuation-related problem, I tried:
"t0001 aaron hank 01 jpg", but NO MATCH

Then I thought maybe it has something to do with periods marking  phrase 
boundaries? Although I had never heard of any such thing.  However:

"/opr/t0001" MATCHES
"/opr/t0001/e0001" NO MATCH
"t0001/e0001" MATCHES
!!!

I am surmising that a word can contain only a single punctuation mark?? 
And something wacky is going on with phrase boundaries??  I can't intuit 
the rules governing this - can anyone elucidate? Is this a bug? 

Again - this is new behavior in 3.1-3.1.  In 3.0.6 the very first query 
worked as expected, matching the single node listed above.

-Mike

PS: I also tried messing around with attribute-value-query and wildcards 
and couldn't get things working there either :-(






More information about the General mailing list