[MarkLogic Dev General] word boundaries

Danny Sokolsky dsokolsky at marklogic.com
Mon May 5 09:53:59 PDT 2008


Well, there are many ways to do what you describe, but not having the
specifics of what you are trying to do, I will  try and describe one
easy way.  Say you want to find documents that have the word "dog" in
them.  You can then do a cts:search of all of your documents with a word
query that searches for dog, as follows:

 

cts:search(doc(), cts:word-query("dog"))[1 to 10]

 

This returns the first 10 (by relevance score) documents in the database
in which the word dog appears in them somewhere.

 

-Danny

 

From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of
Vijayasekar Palaniswamy
Sent: Monday, May 05, 2008 12:08 AM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] word boundaries

 

Hi,

I have just loaded XML documents into database with different structures
and now i want to make a content search from those xml documents. So,
how can i make a search from those XML files, which is having different
structures. (different nodes)

Thanks.

On 5/2/08, Mike Sokolov <sokolov at ifactory.com> wrote:

I think that elements are always treated as word boundaries by the
indexer, regardless of phrase-through, phrase-around and
element-word-query settings.  Is that true?

Example; I was thinking the following might get treated as a word
(Jonson or Johnson, depending on phrase-through/around), but doesn't
seem to:

Jo<optional>h</optional>nson

-Mike Sokolov
_______________________________________________
General mailing list
General at developer.marklogic.com
http://xqzone.com/mailman/listinfo/general




-- 
Regards,

Vijay 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20080505/781082a3/attachment.html


More information about the General mailing list