Re: [MarkLogic Dev General] cts:search and xdmp:save()

2012-06-19 Thread Geert Josten
Hi Yashmeet,



I am not sure I fully understand your problem. Most notably, why are you
using value-matching instead of just plain word searching? Can you give a
full test case with two small xml files, the exact results you expect, and
a running piece of code that shown what you attempted so far?



The docs are a bit misguiding about xdmp:save, you can save any kind of doc
with it, text, binary and xml. Just pass the node you want saved.



Kind regards,

Geert



*Van:* general-boun...@developer.marklogic.com [mailto:
general-boun...@developer.marklogic.com] *Namens *Yeshmeet Singh
*Verzonden:* dinsdag 19 juni 2012 7:55
*Aan:* general@developer.marklogic.com
*Onderwerp:* [MarkLogic Dev General] cts:search and xdmp:save()



Hi,



I am having some trouble with the cts:search. I have an application in
which when a user enters a search term I take that term and search it
through the marklogic collections and return the result. Now what problem I
am facing is that in the database in my xml file I have a tag called
head, now if in this head if I have any statement that has a “?” in it it
is not being returned by the cts:search. For example if I search for a term
say “EPL and Fixtures” what I do first is create a cts:element-value-match
query to search the database first and store that query in a variable which
gives me the following output-



Let $t := v:results v:warning=non-element itemcts:and-query

cts:or-querycts:element-value-query

cts:element_1:head/cts:element

cts:text xml:lang=enEPL and Fixtures: Are the fixtures out?/cts:text

cts:optioncase-insensitive/cts:option

cts:optiondiacritic-sensitive/cts:option

cts:optionpunctuation-insensitive/cts:option

cts:optionunstemmed/cts:option

/cts:element-value-query

cts:element-value-query

cts:element_1:head/cts:element

cts:text xml:lang=enFixtures and the EPL 2009: Champion?/cts:text

cts:optioncase-insensitive/cts:option

cts:optiondiacritic-sensitive/cts:option

cts:optionpunctuation-insensitive/cts:option

cts:optionunstemmed/cts:option

/cts:element-value-query

/cts:or-query

cts:element-word-query

cts:element_1:head/cts:element

cts:textxml:lang=enEPL/cts:text

cts:optioncase-insensitive/cts:option

cts:optiondiacritic-sensitive/cts:option

cts:optionpunctuation-insensitive/cts:option

cts:optionunstemmed/cts:option

/cts:element-word-query

cts:or-query

cts:element-word-query

cts:element_1:head/cts:element

cts:textxml:lang=enFixtures/cts:text

cts:optioncase-insensitive/cts:option

cts:optiondiacritic-sensitive/cts:option

cts:optionpunctuation-insensitive/cts:option

cts:optionunstemmed/cts:option

/cts:element-word-query

cts:element-word-query

cts:element_1:head/cts:element

cts:textxml:lang=enFixtures*/cts:text

cts:optioncase-insensitive/cts:option

cts:optiondiacritic-sensitive/cts:option

cts:optionpunctuation-insensitive/cts:option

cts:optionunstemmed/cts:option

/cts:element-word-query

/cts:or-query

cts:collection-query

cts:uridictionaryid /cts:uri

/cts:collection-query

cts:collection-querycts:uridictionarystatus/cts:uri

/cts:collection-query

/cts:and-query

/v:results



Now I make a call to my cts search-

Let result := cts:search(/wl:start, $t)



The above does not return any result. And this is happening only for those
terms in my head tag that have “?”.



Also I wanted to write the output of my xqy file into an xml file. Using
xdmp:save() we can create a text file. Is there any way to create an xml
file?



Thanks

Yashmeet Singh



 CAUTION - Disclaimer *

This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely

for the use of the addressee(s). If you are not the intended recipient, please

notify the sender by e-mail and delete the original message. Further,
you are not

to copy, disclose, or distribute this e-mail or its contents to any
other person and

any such actions are unlawful. This e-mail may contain viruses.
Infosys has taken

every reasonable precaution to minimize this risk, but is not liable
for any damage

you may sustain as a result of any virus in this e-mail. You should
carry out your

own virus checks before opening the e-mail or attachment. Infosys reserves the

right to monitor and review the content of all messages sent to or
from this e-mail

address. Messages sent to or from this e-mail address may be stored on the

Infosys e-mail system.

***INFOSYS End of Disclaimer INFOSYS***
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] cts:search and xdmp:save()

2012-06-19 Thread Yeshmeet Singh
Thanks Greet I was able to save my xml file.

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten
Sent: Tuesday, June 19, 2012 11:49 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] cts:search and xdmp:save()

Hi Yashmeet,

I am not sure I fully understand your problem. Most notably, why are you using 
value-matching instead of just plain word searching? Can you give a full test 
case with two small xml files, the exact results you expect, and a running 
piece of code that shown what you attempted so far?

The docs are a bit misguiding about xdmp:save, you can save any kind of doc 
with it, text, binary and xml. Just pass the node you want saved.

Kind regards,
Geert

Van: 
general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com
 
[mailto:general-bounces@developer.mmailto:general-bounces@developer.marklogic.comhttp://arklogic.com]
 Namens Yeshmeet Singh
Verzonden: dinsdag 19 juni 2012 7:55
Aan: general@developer.marklogic.commailto:general@developer.marklogic.com
Onderwerp: [MarkLogic Dev General] cts:search and xdmp:save()

Hi,

I am having some trouble with the cts:search. I have an application in which 
when a user enters a search term I take that term and search it through the 
marklogic collections and return the result. Now what problem I am facing is 
that in the database in my xml file I have a tag called head, now if in this 
head if I have any statement that has a ? in it it is not being returned by 
the cts:search. For example if I search for a term say EPL and Fixtures what 
I do first is create a cts:element-value-match query to search the database 
first and store that query in a variable which gives me the following output-

Let $t := v:results v:warning=non-element itemcts:and-query
cts:or-querycts:element-value-query
cts:element_1:head/cts:element
cts:text xml:lang=enEPL and Fixtures: Are the fixtures out?/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-value-query
cts:element-value-query
cts:element_1:head/cts:element
cts:text xml:lang=enFixtures and the EPL 2009: Champion?/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-value-query
/cts:or-query
cts:element-word-query
cts:element_1:head/cts:element
cts:textxml:lang=enEPL/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-word-query
cts:or-query
cts:element-word-query
cts:element_1:head/cts:element
cts:textxml:lang=enFixtures/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-word-query
cts:element-word-query
cts:element_1:head/cts:element
cts:textxml:lang=enFixtures*/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-word-query
/cts:or-query
cts:collection-query
cts:uridictionaryid /cts:uri
/cts:collection-query
cts:collection-querycts:uridictionarystatus/cts:uri
/cts:collection-query
/cts:and-query
/v:results

Now I make a call to my cts search-
Let result := cts:search(/wl:start, $t)

The above does not return any result. And this is happening only for those 
terms in my head tag that have ?.

Also I wanted to write the output of my xqy file into an xml file. Using 
xdmp:save() we can create a text file. Is there any way to create an xml file?

Thanks
Yashmeet Singh


 CAUTION - Disclaimer *

This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely

for the use of the addressee(s). If you are not the intended recipient, please

notify the sender by e-mail and delete the original message. Further, you are 
not

to copy, disclose, or distribute this e-mail or its contents to any other 
person and

any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken

every reasonable precaution to minimize this risk, but is not liable for any 
damage

you may sustain as a result of any virus in this e-mail. You should carry out 
your

own virus checks before opening the e-mail or attachment. Infosys reserves the

right to monitor and review the content of all messages sent to or from this 
e-mail

address. Messages sent to or from this e-mail address may be stored on the

Infosys e-mail system.

***INFOSYS End of Disclaimer INFOSYS***


___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] issue creating facet in search

2012-06-19 Thread amit gope
Hi All,

When i am adding a new constraint to add a new facet, i am unable to use it
as the element on which constraint is being made does not have a range
defined for it.

This is the part of the xml ::*Book Language=EnBookInfo Language=En
TocLevels=0 NumberingStyle=Unnumbered ContainsESM=No
BookProductType=Proceedings MediaType=Book/BookInfo/Book*

i want to create a facet on BookInfo/@BookProductType, but i am unable to
do it, can anyone tell me how to achieve this?

-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Calling Unix/Perl scripts from Xquery

2012-06-19 Thread Geert Josten
Hi Arti,



At present: no, not directly. But you could hook them up behind an
old-fashion CGI server perhaps (limited to localhost access I guess), and
do HTTP requests to them..



Kind regards,

Geert



*Van:* general-boun...@developer.marklogic.com [mailto:
general-boun...@developer.marklogic.com] *Namens *Arti Paramanantham
*Verzonden:* dinsdag 19 juni 2012 12:43
*Aan:* General MarkLogic Developer Discussion
*Onderwerp:* [MarkLogic Dev General] Calling Unix/Perl scripts from Xquery



Hi,



Is there a way to invoke Unix/Perl scripts from Xquery/MarkLogic?



Thanks,

Arti
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Clarification required on App builder using Custom XSLT

2012-06-19 Thread Aiswarya
 

Hi,

 

When I was trying to transform XML to HTML5 using Custom XSLT option
available in Appbuilder to display the search results of the document, I
found some of the XSL lines got printed as such. For eg: the below lines has
been printed as such in browsers.

 

xsl:value-of select=concat('lt;div class=#34;moclass#34;
id=#34;mo',$number,'#34;gt;')  disable-output-escaping=yes/

xsl:value-of select='lt;/divgt;' disable-output-escaping=yes/

 

Is that a bug with ML or is there any work around available to accomplish
this.

 

Thanks

Aiswarya V

 

Aiswarya Venkatachalapathy

IPF/Authoring Environment

Laserwords

 

T: +91-044-43928300 Ext : 638

aiswarya.venkatachalapa...@laserwords.com

www.laserwords.com

 

Laserwords is an SPi Global company



The contents of this email may contain legally protected confidential or
privileged information.  If you are not the intended recipient, any
dissemination, retention or use of any information contained in this email
is prohibited.  If you have received this email in error, please promptly
notify the sender by reply email and delete the original email and any
backup copies without reading them.  Thank you.

 

image001.gif___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Calling Unix/Perl scripts from Xquery

2012-06-19 Thread David Lee
Not directly.
But indirectly yes, the same way that MLJAM works and MLSQL work.
You can setup a http server (like Tomcat) that runs the scripts.
Then you send a HTTP command from XQuery to the server to run the scripts and 
return the results.

I have used this technique to run xmlsh scripts from ML/XQuery to do things 
like running FOP to produce PDF.
You can write your own servlet, use CGI  (in a plain apache server) or borrow 
the servlet code from xmlsh, or MLJAM or MLSQL.



-
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 650-287-2531
Cell:  +1 812-630-7622
www.marklogic.comhttp://www.marklogic.com/

This e-mail and any accompanying attachments are confidential. The information 
is intended solely for the use of the individual to whom it is addressed. Any 
review, disclosure, copying, distribution, or use of this e-mail communication 
by others is strictly prohibited. If you are not the intended recipient, please 
notify us immediately by returning this message to the sender and delete all 
copies. Thank you for your cooperation.

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Arti Paramanantham
Sent: Tuesday, June 19, 2012 6:43 AM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Calling Unix/Perl scripts from Xquery

Hi,

Is there a way to invoke Unix/Perl scripts from Xquery/MarkLogic?

Thanks,
Arti

___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] cts:search and xdmp:save()

2012-06-19 Thread Mary Holstege
Try adding an explicit unwilcarded option. Question mark is a wildcard 
character, so you are looking for something that matches that word with one 
more character at the end.

Sent from my Samsung Epic™ 4G


Yeshmeet Singh yeshmeet_si...@infosys.com wrote:


Hi,

I am having some trouble with the cts:search. I have an application in which 
when a user enters a search term I take that term and search it through the 
marklogic collections and return the result. Now what problem I am facing is 
that in the database in my xml file I have a tag called head, now if in this 
head if I have any statement that has a “?” in it it is not being returned by 
the cts:search. For example if I search for a term say “EPL and Fixtures” what 
I do first is create a cts:element-value-match query to search the database 
first and store that query in a variable which gives me the following output-

Let $t := v:results v:warning=non-element itemcts:and-query
cts:or-querycts:element-value-query
cts:element_1:head/cts:element
cts:text xml:lang=enEPL and Fixtures: Are the fixtures out?/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-value-query
cts:element-value-query
cts:element_1:head/cts:element
cts:text xml:lang=enFixtures and the EPL 2009: Champion?/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-value-query
/cts:or-query
cts:element-word-query
cts:element_1:head/cts:element
cts:textxml:lang=enEPL/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-word-query
cts:or-query
cts:element-word-query
cts:element_1:head/cts:element
cts:textxml:lang=enFixtures/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-word-query
cts:element-word-query
cts:element_1:head/cts:element
cts:textxml:lang=enFixtures*/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-word-query
/cts:or-query
cts:collection-query
cts:uridictionaryid /cts:uri
/cts:collection-query
cts:collection-querycts:uridictionarystatus/cts:uri
/cts:collection-query
/cts:and-query
/v:results

Now I make a call to my cts search-
Let result := cts:search(/wl:start, $t)

The above does not return any result. And this is happening only for those 
terms in my head tag that have “?”.

Also I wanted to write the output of my xqy file into an xml file. Using 
xdmp:save() we can create a text file. Is there any way to create an xml file?

Thanks
Yashmeet Singh


 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are 
not
to copy, disclose, or distribute this e-mail or its contents to any other 
person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken
every reasonable precaution to minimize this risk, but is not liable for any 
damage
you may sustain as a result of any virus in this e-mail. You should carry out 
your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this 
e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] cts:search and xdmp:save()

2012-06-19 Thread David Lee
This is confusing to me.
From my read of this, the ? is in the data not the query ... so how is 
wildcarded or not affect this ?

-
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 650-287-2531
Cell:  +1 812-630-7622
www.marklogic.comhttp://www.marklogic.com/

This e-mail and any accompanying attachments are confidential. The information 
is intended solely for the use of the individual to whom it is addressed. Any 
review, disclosure, copying, distribution, or use of this e-mail communication 
by others is strictly prohibited. If you are not the intended recipient, please 
notify us immediately by returning this message to the sender and delete all 
copies. Thank you for your cooperation.

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Mary Holstege
Sent: Tuesday, June 19, 2012 10:13 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] cts:search and xdmp:save()

Try adding an explicit unwilcarded option. Question mark is a wildcard 
character, so you are looking for something that matches that word with one 
more character at the end.

Sent from my Samsung Epic™ 4G


Yeshmeet Singh yeshmeet_si...@infosys.com wrote:

Hi,

I am having some trouble with the cts:search. I have an application in which 
when a user enters a search term I take that term and search it through the 
marklogic collections and return the result. Now what problem I am facing is 
that in the database in my xml file I have a tag called head, now if in this 
head if I have any statement that has a “?” in it it is not being returned by 
the cts:search. For example if I search for a term say “EPL and Fixtures” what 
I do first is create a cts:element-value-match query to search the database 
first and store that query in a variable which gives me the following output-

Let $t := v:results v:warning=non-element itemcts:and-query
cts:or-querycts:element-value-query
cts:element_1:head/cts:element
cts:text xml:lang=enEPL and Fixtures: Are the fixtures out?/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-value-query
cts:element-value-query
cts:element_1:head/cts:element
cts:text xml:lang=enFixtures and the EPL 2009: Champion?/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-value-query
/cts:or-query
cts:element-word-query
cts:element_1:head/cts:element
cts:textxml:lang=enEPL/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-word-query
cts:or-query
cts:element-word-query
cts:element_1:head/cts:element
cts:textxml:lang=enFixtures/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-word-query
cts:element-word-query
cts:element_1:head/cts:element
cts:textxml:lang=enFixtures*/cts:text
cts:optioncase-insensitive/cts:option
cts:optiondiacritic-sensitive/cts:option
cts:optionpunctuation-insensitive/cts:option
cts:optionunstemmed/cts:option
/cts:element-word-query
/cts:or-query
cts:collection-query
cts:uridictionaryid /cts:uri
/cts:collection-query
cts:collection-querycts:uridictionarystatus/cts:uri
/cts:collection-query
/cts:and-query
/v:results

Now I make a call to my cts search-
Let result := cts:search(/wl:start, $t)

The above does not return any result. And this is happening only for those 
terms in my head tag that have “?”.

Also I wanted to write the output of my xqy file into an xml file. Using 
xdmp:save() we can create a text file. Is there any way to create an xml file?

Thanks
Yashmeet Singh


 CAUTION - Disclaimer *

This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely

for the use of the addressee(s). If you are not the intended recipient, please

notify the sender by e-mail and delete the original message. Further, you are 
not

to copy, disclose, or distribute this e-mail or its contents to any other 
person and

any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken

every reasonable precaution to minimize this risk, but is not liable for any 
damage

you may sustain as a result of any virus in this e-mail. You should carry out 
your

own virus checks before opening the e-mail or attachment. Infosys reserves the

right to monitor and review the content of all messages sent to or from this 
e-mail

address. Messages sent to or from this e-mail address may be stored on the

Infosys e-mail system.

***INFOSYS End of Disclaimer INFOSYS***



Re: [MarkLogic Dev General] issue creating facet in search

2012-06-19 Thread Geert Josten
Hi Amit,



Since you are talking about constraints, I’m guessing you are using
search:search or related functionality? Yes, you must have a range index to
be able to retrieve facet values. In your case it would be an attribute
range index of type string. You will need to add it through the admin
interface at port 8001.



Kind regards,

Geert



*Van:* general-boun...@developer.marklogic.com [mailto:
general-boun...@developer.marklogic.com] *Namens *amit gope
*Verzonden:* dinsdag 19 juni 2012 12:45
*Aan:* general@developer.marklogic.com
*Onderwerp:* [MarkLogic Dev General] issue creating facet in search



Hi All,

When i am adding a new constraint to add a new facet, i am unable to use it
as the element on which constraint is being made does not have a range
defined for it.

This is the part of the xml ::*Book Language=EnBookInfo Language=En
TocLevels=0 NumberingStyle=Unnumbered ContainsESM=No
BookProductType=Proceedings MediaType=Book/BookInfo/Book*

i want to create a facet on BookInfo/@BookProductType, but i am unable to
do it, can anyone tell me how to achieve this?

-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] cts:search and xdmp:save()

2012-06-19 Thread Michael Blakeley
Understandable, I think. The sample code is hard to read, and won't parse or 
run in its current form. But Mary has powerful ESP.

Here's a test case that shows what I think Mary has in mind. Punctuation in the 
query text could be punctuation or could be a wildcard. Since the term is 
punctuation-insensitive, it is treated as a wildcard. The wildcard will be 
looking for a word character, not a punctuation character, the term fails to 
match anything. The second two forms show possible fixes: be explicit about no 
wildcards, or be punctuation-sensitive.

(: punctuation-insensitive, implicit wildcard :)
cts:contains(
  element test { EPL and Fixtures: Are the fixtures out? },
  cts:element-value-query(
xs:QName('test'),
EPL and Fixtures: Are the fixtures out?,
(case-insensitive,
 diacritic-sensitive,
 punctuation-insensitive,
 unstemmed,
 lang=en))),
(: explicitly not a wildcard :)
cts:contains(
  element test { EPL and Fixtures: Are the fixtures out? },
  cts:element-value-query(
xs:QName('test'),
EPL and Fixtures: Are the fixtures out?,
('unwildcarded',
 case-insensitive,
 diacritic-sensitive,
 punctuation-insensitive,
 unstemmed,
 lang=en))),
(: default wildcard, punctuation-sensitive :)
cts:contains(
  element test { EPL and Fixtures: Are the fixtures out? },
  cts:element-value-query(
xs:QName('test'),
EPL and Fixtures: Are the fixtures out?,
(case-insensitive,
 diacritic-sensitive,
 punctuation-sensitive,
 unstemmed,
 lang=en)))
=
false
true
true

-- Mike

On 19 Jun 2012, at 07:20 , David Lee wrote:

 This is confusing to me.
 From my read of this, the ? is in the data not the query ... so how is 
 wildcarded or not affect this ?
  
 -
 David Lee
 Lead Engineer
 MarkLogic Corporation
 d...@marklogic.com
 Phone: +1 650-287-2531
 Cell:  +1 812-630-7622
 www.marklogic.com
 
 This e-mail and any accompanying attachments are confidential. The 
 information is intended solely for the use of the individual to whom it is 
 addressed. Any review, disclosure, copying, distribution, or use of this 
 e-mail communication by others is strictly prohibited. If you are not the 
 intended recipient, please notify us immediately by returning this message to 
 the sender and delete all copies. Thank you for your cooperation.
  
 From: general-boun...@developer.marklogic.com 
 [mailto:general-boun...@developer.marklogic.com] On Behalf Of Mary Holstege
 Sent: Tuesday, June 19, 2012 10:13 AM
 To: MarkLogic Developer Discussion
 Subject: Re: [MarkLogic Dev General] cts:search and xdmp:save()
  
 Try adding an explicit unwilcarded option. Question mark is a wildcard 
 character, so you are looking for something that matches that word with one 
 more character at the end.
 
 Sent from my Samsung Epic™ 4G 
 
 
 Yeshmeet Singh yeshmeet_si...@infosys.com wrote:
 
 
 Hi,
  
 I am having some trouble with the cts:search. I have an application in which 
 when a user enters a search term I take that term and search it through the 
 marklogic collections and return the result. Now what problem I am facing is 
 that in the database in my xml file I have a tag called head, now if in 
 this head if I have any statement that has a “?” in it it is not being 
 returned by the cts:search. For example if I search for a term say “EPL and 
 Fixtures” what I do first is create a cts:element-value-match query to search 
 the database first and store that query in a variable which gives me the 
 following output-
  
 Let $t := v:results v:warning=non-element itemcts:and-query
 cts:or-querycts:element-value-query
 cts:element_1:head/cts:element
 cts:text xml:lang=enEPL and Fixtures: Are the fixtures out?/cts:text
 cts:optioncase-insensitive/cts:option
 cts:optiondiacritic-sensitive/cts:option
 cts:optionpunctuation-insensitive/cts:option
 cts:optionunstemmed/cts:option
 /cts:element-value-query
 cts:element-value-query
 cts:element_1:head/cts:element
 cts:text xml:lang=enFixtures and the EPL 2009: Champion?/cts:text
 cts:optioncase-insensitive/cts:option
 cts:optiondiacritic-sensitive/cts:option
 cts:optionpunctuation-insensitive/cts:option
 cts:optionunstemmed/cts:option
 /cts:element-value-query
 /cts:or-query
 cts:element-word-query
 cts:element_1:head/cts:element
 cts:textxml:lang=enEPL/cts:text
 cts:optioncase-insensitive/cts:option
 cts:optiondiacritic-sensitive/cts:option
 cts:optionpunctuation-insensitive/cts:option
 cts:optionunstemmed/cts:option
 /cts:element-word-query
 cts:or-query
 cts:element-word-query
 cts:element_1:head/cts:element
 cts:textxml:lang=enFixtures/cts:text
 cts:optioncase-insensitive/cts:option
 cts:optiondiacritic-sensitive/cts:option
 cts:optionpunctuation-insensitive/cts:option
 cts:optionunstemmed/cts:option
 /cts:element-word-query
 cts:element-word-query
 cts:element_1:head/cts:element
 cts:textxml:lang=enFixtures*/cts:text
 

[MarkLogic Dev General] Search:Search result attribute path not returning full path on exact match

2012-06-19 Thread Erik Zander
Hi

I have a problem with the search:search function and the result it gives me.
The problem shows when I for example searches for the word Polikliniskt in the 
following structure


section
titleMätning av blodtryck/title
section
titlePolikliniskt/title
paraUnder normala fysiologiska förhållande föreligger stora variationer i 
blodtryck

The resulting path attribute in the matches element in search result  for 
Polikliniskt do not contains the title element only //section/section. In 
other words the resulting path is //section/section instead of 
//section/section/title

This behavior only occurs when the search term exactly matches the text within 
one element so if it's only one word i.e. title above or when quotes are used 
to indicate match exactly like Mätning av blodtryck.

The search options can be found below for even more information.

  param $searchString (string) The query string
  param $paths (???)
  return (xml) The result
:)



declare function medlib:getSearchResult($searchQueryString, $path) {
  let $options :=
options xmlns=http://marklogic.com/appservices/search;
  searchable-expression{$path}/searchable-expression
  search-optionscore-logtfidf/search-option
  search-optionfiltered/search-option
  page-length10/page-length
 (: return-plantrue/return-plan:)
  term
term-optionlang=sv/term-option
term-optionwildcarded/term-option
term-optioncase-insensitive/term-option
term-optionwhitespace-insensitive/term-option
term-optionpunctuation-insensitive/term-option
term-optiondiacritic-sensitive/term-option
empty apply=all-results/
  /term
  transform-results apply=snippet
per-match-tokens100/per-match-tokens
max-matches2000/max-matches
max-snippet-chars4/max-snippet-chars
preferred-elements/
  /transform-results

  debugtrue/debug
/options

  let $result := search:search($searchQueryString, $options)

  return $result



Regards
Erik Zander
Developer @
Studentlitteratur AB
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Search:Search result attribute path not returning full path on exact match

2012-06-19 Thread Will Thompson
Eric,

search:search will only return paths matching your searchable expression. You 
could pass //title as part of your $paths variable, or change your searchable 
expression: 
searchable-expression{concat($path,|//title)}/searchable-expression.

-Will


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Erik Zander
Sent: Tuesday, June 19, 2012 8:40 AM
To: general@developer.marklogic.com
Subject: [MarkLogic Dev General] Search:Search result attribute path not 
returning full path on exact match

Hi

I have a problem with the search:search function and the result it gives me.
The problem shows when I for example searches for the word Polikliniskt in the 
following structure


section
titleMätning av blodtryck/title
section
titlePolikliniskt/title
paraUnder normala fysiologiska förhållande föreligger stora variationer i 
blodtryck

The resulting path attribute in the matches element in search result  for 
Polikliniskt do not contains the title element only //section/section. In 
other words the resulting path is //section/section instead of 
//section/section/title

This behavior only occurs when the search term exactly matches the text within 
one element so if it's only one word i.e. title above or when quotes are used 
to indicate match exactly like Mätning av blodtryck.

The search options can be found below for even more information.

  param $searchString (string) The query string
  param $paths (???)
  return (xml) The result
:)



declare function medlib:getSearchResult($searchQueryString, $path) {
  let $options :=
options xmlns=http://marklogic.com/appservices/search;
  searchable-expression{$path}/searchable-expression
  search-optionscore-logtfidf/search-option
  search-optionfiltered/search-option
  page-length10/page-length
 (: return-plantrue/return-plan:)
  term
term-optionlang=sv/term-option
term-optionwildcarded/term-option
term-optioncase-insensitive/term-option
term-optionwhitespace-insensitive/term-option
term-optionpunctuation-insensitive/term-option
term-optiondiacritic-sensitive/term-option
empty apply=all-results/
  /term
  transform-results apply=snippet
per-match-tokens100/per-match-tokens
max-matches2000/max-matches
max-snippet-chars4/max-snippet-chars
preferred-elements/
  /transform-results

  debugtrue/debug
/options

  let $result := search:search($searchQueryString, $options)

  return $result



Regards
Erik Zander
Developer @
Studentlitteratur AB
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Best way to copy data from a 3-node ML cluster to 1 ML server

2012-06-19 Thread Michael Blakeley
You could do that, but you might end up with more forests than you really want 
on the destination host. That could be temporary while you use 
https://github.com/mblakele/corb-rebalancer to coalesce the forests.

But this is pretty much what XQSync was designed to do. It isn't as fast as 
backup-restore, but it is much more flexible.

-- Mike

On 19 Jun 2012, at 11:35 , Danny Sinang wrote:

 Hi Geert,
 
 No, am looking for a complete copy.
 
 The database on the 3-node cluster uses forests spread across the 3 nodes.
 
 Are you saying I can backup the forests on the 3 QA nodes and restore them on 
 the singe DEV server ?
 
 Regards,
 Danny
 
 On Tue, Jun 19, 2012 at 2:12 PM, Geert Josten geert.jos...@dayon.nl wrote:
 Hi Danny,
 
  
 Looking for a partial copy? If not, why not do a plain backup/restore?
 
  
 Kind regards,
 
 Geert
 
  
  
 Van: general-boun...@developer.marklogic.com 
 [mailto:general-boun...@developer.marklogic.com] Namens Danny Sinang
 Verzonden: dinsdag 19 juni 2012 19:51
 Aan: general
 Onderwerp: [MarkLogic Dev General] Best way to copy data from a 3-node ML 
 cluster to 1 ML server
 
  
 Hello,
 
  
 Is XQSync the best way to copy data from a 3-node ML cluster (our QA 
 environment) to a single ML server (our Dev environment) ?
 
  
 Or is there a better way / tool out there ?
 
  
 Regards,
 Danny
 
  
  
 
 ___
 General mailing list
 General@developer.marklogic.com
 http://community.marklogic.com/mailman/listinfo/general
 
 
 ___
 General mailing list
 General@developer.marklogic.com
 http://community.marklogic.com/mailman/listinfo/general

___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general