Danny Sinang | 16 Aug 2012 17:00
Picon

[MarkLogic Dev General] Local-disk forest failover

Hi,


When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?

Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?

Regards,
Danny


<div>
<p>Hi,</p>
<div><br></div>
<div>When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?</div>
<div><br></div>
<div>Also, will the surviving cluster node try to replicate the new forest to some other cluster members &nbsp;?</div>

<div><br></div>
<div>Regards,</div>
<div>Danny</div>
<div><br></div>
<div><br></div>
</div>
Michael Blakeley | 16 Aug 2012 19:23
Favicon

Re: [MarkLogic Dev General] Local-disk forest failover

No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately -
not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
> 
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
> 
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
> 
> Regards,
> Danny
> 
> 
> _______________________________________________
> General mailing list
> General@...
> http://developer.marklogic.com/mailman/listinfo/general

Wayne Feick | 16 Aug 2012 19:33

Re: [MarkLogic Dev General] Local-disk forest failover

A slight refinement; replicas are equivalent copies rather than exact copies. You'll have the same
fragments, but likely organized differently into stands.

Wayne

Michael Blakeley <mike@...> wrote:

No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately -
not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
>
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
>
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>
> Regards,
> Danny
>
>
> _______________________________________________
> General mailing list
> General@...
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General@...
http://developer.marklogic.com/mailman/listinfo/general
Daniel S. Smith (ICS | 16 Aug 2012 23:27
Gravatar

[MarkLogic Dev General] Version of MarkLogic HTTP operations

It looks like the MarkLogic HTTP operations (e.g. xdmp:http-get) are using HTTP/1.0

 

Is HTTP/1.1 supported?

 

This request:

 

xdmp:http-get('http://www.marklogic.com')

 

Generates this:

 

GET / HTTP/1.0

From: user-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org

User-Agent: MarkLogic

Host: www.marklogic.com

 

Thanks,

 

-Dan Smith

<div>
<div class="WordSection1">
<p class="MsoNormal">It looks like the MarkLogic HTTP operations (e.g. xdmp:http-get) are using HTTP/1.0<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Is HTTP/1.1 supported?<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">This request:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">xdmp:http-get('http://www.marklogic.com')<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Generates this:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">GET / HTTP/1.0<p></p></p>
<p class="MsoNormal">From: user@...<p></p></p>
<p class="MsoNormal">User-Agent: MarkLogic<p></p></p>
<p class="MsoNormal">Host: <a href="http://www.marklogic.com">www.marklogic.com</a><p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Thanks,<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">-Dan Smith<p></p></p>
</div>
</div>
Jason Hunter | 17 Aug 2012 07:52

Re: [MarkLogic Dev General] Local-disk forest failover

On Aug 16, 2012, at 8:00 AM, Danny Sinang wrote:

> When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?

No.  It will already be indexed and ready to go.

> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?

No.  The only replication that happens is that which is configured.  You could script up whatever actions you
wanted, of course.

-jh-

amit gope | 17 Aug 2012 14:53
Picon

Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Hi Geert,

My search options has almost 20 constraints and when i add the term option as unstemmed to be common for all the constaints it doesn't work, but when i provide the term-option value unstemmed to individual constraints then it works, why this is happening, is this a feature of search api to provide separate term option?


--
Regards
Amit

On 17 August 2012 00:30, <general-request-ld4jwAGwUXTgXEvjvSGRgBvyUsyucf76@public.gmane.orgc.com> wrote:
Send General mailing list submissions to
        general <at> developer.marklogic.com

To subscribe or unsubscribe via the World Wide Web, visit
        http://developer.marklogic.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
        general-request-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

You can reach the person managing the list at
        general-owner-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of General digest..."

Today's Topics:

   1. Natural language version of a query? (Tim Finney)
   2. Query on multiple language using search api (amit gope)
   3. Re: Natural language version of a query? (Geert Josten)
   4. Re: Query on multiple language using search       api (Geert Josten)
   5. Local-disk forest failover (Danny Sinang)
   6. Re: Local-disk forest failover (Michael Blakeley)
   7. Re: Local-disk forest failover (Wayne Feick)


---------- Forwarded message ----------
From: Tim Finney <tjf-x8A8oWIB5IvR7s880joybQ@public.gmane.org>
To: general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
Cc: 
Date: Wed, 15 Aug 2012 18:29:12 -0300
Subject: [MarkLogic Dev General] Natural language version of a query?
Hi All,

Has anyone here tried to produce a natural language equivalent of a
search string or the kind used in search:search? As an example, here is
an imaginary search string:

cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
date-after:1984-03-01 date-before:1991-05-31

I'd like to end up with something like this:

cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
1984-03-01 AND before 1991-05-31

(Things are complicated by parentheses, NEAR, NOT, ...)

Are there any built-in functions for doing such a thing?

Best,

Tim Finney






---------- Forwarded message ----------
From: amit gope <amitgope2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: general-ld4jwAGwUXTgXEvjvSGRgNi2O/JbrIOy@public.gmane.orgic.com
Cc: 
Date: Thu, 16 Aug 2012 11:42:18 +0530
Subject: [MarkLogic Dev General] Query on multiple language using search api
Hello All,

Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english. How do i mention the language constraint to include the search for languages de and fr as well?


Regards
Amit




---------- Forwarded message ----------
From: Geert Josten <geert.josten-YDuq3plZH9s@public.gmane.org>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 10:22:13 +0200
Subject: Re: [MarkLogic Dev General] Natural language version of a query?
Hi Tim,

There is a grammar option in search:search options, but haven't looked
into that myself yet. Perhaps the documentation can make clear whether you
can use that or not.

Alternative is to pre-process the search query yourself. You can try to
tackle it with regex, but it might be more fun to write a grammar for it
and use the handy site maintained by Gunther Rademacher to generate XQuery
code out of it:

http://www.bottlecaps.de/rex/

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van: general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
[mailto:general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org] Namens Tim Finney
Verzonden: woensdag 15 augustus 2012 23:29
Aan: general <at> developer.marklogic.com
Onderwerp: [MarkLogic Dev General] Natural language version of a query?

Hi All,

Has anyone here tried to produce a natural language equivalent of a search
string or the kind used in search:search? As an example, here is an
imaginary search string:

cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
date-after:1984-03-01 date-before:1991-05-31

I'd like to end up with something like this:

cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
1984-03-01 AND before 1991-05-31

(Things are complicated by parentheses, NEAR, NOT, ...)

Are there any built-in functions for doing such a thing?

Best,

Tim Finney



_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgA@public.gmane.orggic.com
http://developer.marklogic.com/mailman/listinfo/general



---------- Forwarded message ----------
From: Geert Josten <geert.josten-YDuq3plZH9s@public.gmane.org>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 10:25:46 +0200
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api

Hi Amit,

 

Haven’t tried, but you should be able to add <term-option>lang=en</term-option><term-option>lang=de</term-option><term-option>lang=fr</term-option> to the relevant constraint..

 

Kind regards,

Geert

 

PS: I’m wondering whether it would also accept lang=en,de,fr, but the docs don’t seem to indicate so..

 

Van: general-bounces <at> developer.marklogic.com [mailto:general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org] Namens amit gope
Verzonden: donderdag 16 augustus 2012 8:12
Aan: general <at> developer.marklogic.com
Onderwerp: [MarkLogic Dev General] Query on multiple language using search api

 

Hello All,

Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english. How do i mention the language constraint to include the search for languages de and fr as well?


Regards
Amit



---------- Forwarded message ----------
From: Danny Sinang <d.sinang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: general <General <at> developer.marklogic.com>
Cc: 
Date: Thu, 16 Aug 2012 11:00:54 -0400
Subject: [MarkLogic Dev General] Local-disk forest failover
Hi,

When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?

Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?

Regards,
Danny




---------- Forwarded message ----------
From: Michael Blakeley <mike-dWgsRPgt/GtWk0Htik3J/w@public.gmane.org>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 10:23:30 -0700
Subject: Re: [MarkLogic Dev General] Local-disk forest failover
No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
>
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?
>
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>
> Regards,
> Danny
>
>
> _______________________________________________
> General mailing list
> General <at> developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general




---------- Forwarded message ----------
From: Wayne Feick <Wayne.Feick-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 10:33:39 -0700
Subject: Re: [MarkLogic Dev General] Local-disk forest failover
A slight refinement; replicas are equivalent copies rather than exact copies. You'll have the same fragments, but likely organized differently into stands.

Wayne


Michael Blakeley <mike-dWgsRPgt/GtWk0Htik3J/w@public.gmane.org> wrote:


No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
>
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?
>
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>
> Regards,
> Danny
>
>
> _______________________________________________
> General mailing list
> General <at> developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgA@public.gmane.orggic.com
http://developer.marklogic.com/mailman/listinfo/general


_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgA@public.gmane.orggic.com
http://developer.marklogic.com/mailman/listinfo/general






<div>
<p>Hi Geert,<br><br>My search options has almost 20 constraints and when i add the term option as unstemmed to be common for all the constaints it doesn't work, but when i provide the term-option value unstemmed to individual constraints then it works, why this is happening, is this a feature of search api to provide separate term option?<br><br><br>-- <br>Regards<br>Amit <br><br></p>
<div class="gmail_quote">On 17 August 2012 00:30,  <span dir="ltr">&lt;<a href="mailto:general-request <at> developer.marklogic.com" target="_blank">general-request@...c.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">Send General mailing list submissions to<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general@...">general <at> developer.marklogic.com</a><br><br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br>
or, via email, send a message with subject or body 'help' to<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general-request@...">general-request@...</a><br><br>
You can reach the person managing the list at<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general-owner@...">general-owner@...</a><br><br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of General digest..."<br><br>Today's Topics:<br><br>
&nbsp; &nbsp;1. Natural language version of a query? (Tim Finney)<br>
&nbsp; &nbsp;2. Query on multiple language using search api (amit gope)<br>
&nbsp; &nbsp;3. Re: Natural language version of a query? (Geert Josten)<br>
&nbsp; &nbsp;4. Re: Query on multiple language using search &nbsp; &nbsp; &nbsp; api (Geert Josten)<br>
&nbsp; &nbsp;5. Local-disk forest failover (Danny Sinang)<br>
&nbsp; &nbsp;6. Re: Local-disk forest failover (Michael Blakeley)<br>
&nbsp; &nbsp;7. Re: Local-disk forest failover (Wayne Feick)<br><br><br>---------- Forwarded message ----------<br>From:&nbsp;Tim Finney &lt;<a href="mailto:tjf@...">tjf@...</a>&gt;<br>To:&nbsp;<a href="mailto:general@...">general@...</a><br>
Cc:&nbsp;<br>Date:&nbsp;Wed, 15 Aug 2012 18:29:12 -0300<br>Subject:&nbsp;[MarkLogic Dev General] Natural language version of a query?<br>Hi All,<br><br>
Has anyone here tried to produce a natural language equivalent of a<br>
search string or the kind used in search:search? As an example, here is<br>
an imaginary search string:<br><br>
cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")<br>
date-after:1984-03-01 date-before:1991-05-31<br><br>
I'd like to end up with something like this:<br><br>
cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after<br>
1984-03-01 AND before 1991-05-31<br><br>
(Things are complicated by parentheses, NEAR, NOT, ...)<br><br>
Are there any built-in functions for doing such a thing?<br><br>
Best,<br><br>
Tim Finney<br><br><br><br><br><br><br>---------- Forwarded message ----------<br>From:&nbsp;amit gope &lt;<a href="mailto:amitgope2@...">amitgope2@...</a>&gt;<br>To:&nbsp;<a href="mailto:general@...">general@...ic.com</a><br>
Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 11:42:18 +0530<br>Subject:&nbsp;[MarkLogic Dev General] Query on multiple language using search api<br>Hello All,<br><br>Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english. How do i mention the language constraint to include the search for languages de and fr as well?<br clear="all"><br><br>Regards<br>Amit <br><br><br><br><br>---------- Forwarded message ----------<br>From:&nbsp;Geert Josten &lt;<a href="mailto:geert.josten@...">geert.josten@...</a>&gt;<br>To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 10:22:13 +0200<br>Subject:&nbsp;Re: [MarkLogic Dev General] Natural language version of a query?<br>Hi Tim,<br><br>
There is a grammar option in search:search options, but haven't looked<br>
into that myself yet. Perhaps the documentation can make clear whether you<br>
can use that or not.<br><br>
Alternative is to pre-process the search query yourself. You can try to<br>
tackle it with regex, but it might be more fun to write a grammar for it<br>
and use the handy site maintained by Gunther Rademacher to generate XQuery<br>
code out of it:<br><br><a href="http://www.bottlecaps.de/rex/" target="_blank">http://www.bottlecaps.de/rex/</a><br><br>
Kind regards,<br>
Geert<br><br>
-----Oorspronkelijk bericht-----<br>
Van: <a href="mailto:general-bounces@...">general-bounces@...</a><br>
[mailto:<a href="mailto:general-bounces@...">general-bounces@...</a>] Namens Tim Finney<br>
Verzonden: woensdag 15 augustus 2012 23:29<br>
Aan: <a href="mailto:general@...">general <at> developer.marklogic.com</a><br>
Onderwerp: [MarkLogic Dev General] Natural language version of a query?<br><br>
Hi All,<br><br>
Has anyone here tried to produce a natural language equivalent of a search<br>
string or the kind used in search:search? As an example, here is an<br>
imaginary search string:<br><br>
cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")<br>
date-after:1984-03-01 date-before:1991-05-31<br><br>
I'd like to end up with something like this:<br><br>
cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after<br>
1984-03-01 AND before 1991-05-31<br><br>
(Things are complicated by parentheses, NEAR, NOT, ...)<br><br>
Are there any built-in functions for doing such a thing?<br><br>
Best,<br><br>
Tim Finney<br><br><br><br>
_______________________________________________<br>
General mailing list<br><a href="mailto:General@...">General@...gic.com</a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br><br><br>---------- Forwarded message ----------<br>From:&nbsp;Geert Josten &lt;<a href="mailto:geert.josten@...">geert.josten@...</a>&gt;<br>To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 10:25:46 +0200<br>Subject:&nbsp;Re: [MarkLogic Dev General] Query on multiple language using search api<br><div link="blue" vlink="purple" lang="NL"><div>
<p class="MsoNormal"><span>Hi Amit,</span></p>

<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Haven&rsquo;t tried, but you should be able to add &lt;term-option&gt;lang=en&lt;/term-option&gt;&lt;term-option&gt;lang=de&lt;/term-option&gt;&lt;term-option&gt;lang=fr&lt;/term-option&gt; to the relevant constraint..</span></p>

<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Kind regards,</span></p>

<p class="MsoNormal"><span>Geert</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>

<p class="MsoNormal"><span>PS: I&rsquo;m wondering whether it would also accept lang=en,de,fr, but the docs don&rsquo;t seem to indicate so..</span></p>

<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Van:</span><span> <a href="mailto:general-bounces@..." target="_blank">general-bounces <at> developer.marklogic.com</a> [mailto:<a href="mailto:general-bounces <at> developer.marklogic.com" target="_blank">general-bounces@...</a>] Namens amit gope<br>Verzonden: donderdag 16 augustus 2012 8:12<br>Aan: <a href="mailto:general@..." target="_blank">general <at> developer.marklogic.com</a><br>Onderwerp: [MarkLogic Dev General] Query on multiple language using search api</span></p>

<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Hello All,<br><br>Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english. How do i mention the language constraint to include the search for languages de and fr as well?<br clear="all"><br><br>Regards<br>Amit <br><br></p>
</div></div>
<br><br>---------- Forwarded message ----------<br>From:&nbsp;Danny Sinang &lt;<a href="mailto:d.sinang@...">d.sinang@...</a>&gt;<br>To:&nbsp;general &lt;<a href="mailto:General@...">General <at> developer.marklogic.com</a>&gt;<br>
Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 11:00:54 -0400<br>Subject:&nbsp;[MarkLogic Dev General] Local-disk forest failover<br>Hi,<div><br></div>
<div>When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?</div>
<div><br></div>
<div>Also, will the surviving cluster node try to replicate the new forest to some other cluster members &nbsp;?</div>

<div><br></div>
<div>Regards,</div>
<div>Danny</div>
<div><br></div>
<div><br></div>
<br><br>---------- Forwarded message ----------<br>From:&nbsp;Michael Blakeley &lt;<a href="mailto:mike@...">mike@...</a>&gt;<br>To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 10:23:30 -0700<br>Subject:&nbsp;Re: [MarkLogic Dev General] Local-disk forest failover<br>No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.<br><br>
This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.<br><br>
-- Mike<br><br>
On 16 Aug 2012, at 08:00 , Danny Sinang wrote:<br><br>
&gt; Hi,<br>
&gt;<br>
&gt; When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?<br>
&gt;<br>
&gt; Also, will the surviving cluster node try to replicate the new forest to some other cluster members &nbsp;?<br>
&gt;<br>
&gt; Regards,<br>
&gt; Danny<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; General mailing list<br>
&gt; <a href="mailto:General@...">General <at> developer.marklogic.com</a><br>
&gt; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br><br><br><br>---------- Forwarded message ----------<br>From:&nbsp;Wayne Feick &lt;<a href="mailto:Wayne.Feick@...">Wayne.Feick@...</a>&gt;<br>To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 10:33:39 -0700<br>Subject:&nbsp;Re: [MarkLogic Dev General] Local-disk forest failover<br>A slight refinement; replicas are equivalent copies rather than exact copies. You'll have the same fragments, but likely organized differently into stands.<br><br>
Wayne<br><br><br>
Michael Blakeley &lt;<a href="mailto:mike@...">mike@...</a>&gt; wrote:<br><br><br>
No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.<br><br>
This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.<br><br>
-- Mike<br><br>
On 16 Aug 2012, at 08:00 , Danny Sinang wrote:<br><br>
&gt; Hi,<br>
&gt;<br>
&gt; When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?<br>
&gt;<br>
&gt; Also, will the surviving cluster node try to replicate the new forest to some other cluster members &nbsp;?<br>
&gt;<br>
&gt; Regards,<br>
&gt; Danny<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; General mailing list<br>
&gt; <a href="mailto:General@...">General <at> developer.marklogic.com</a><br>
&gt; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br>
_______________________________________________<br>
General mailing list<br><a href="mailto:General@...">General@...gic.com</a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br><br>_______________________________________________<br>
General mailing list<br><a href="mailto:General@...">General@...gic.com</a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br>
</blockquote>
</div>
<br><br clear="all"><br><br><br>
</div>
Geert Josten | 17 Aug 2012 15:37
Picon
Favicon

Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Hi Amit,

 

From what I read in the docs, the <term> option (which is one of two that allows <term-option>s, <constraint> being the other) is not to apply term-options generally, but specifically for unconstraint searches. So, if you search for something like:

 

               foo or xx:bar

 

Then the term-options within <term> are applied to ‘foo’. The term-options within <constraint name=”xx”> are applied to ‘bar’..

 

Kind regards,

Geert

 

Van: general-bounces <at> developer.marklogic.com [mailto:general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org] Namens amit gope
Verzonden: vrijdag 17 augustus 2012 14:54
Aan: general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
Onderwerp: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

 

Hi Geert,

My search options has almost 20 constraints and when i add the term option as unstemmed to be common for all the constaints it doesn't work, but when i provide the term-option value unstemmed to individual constraints then it works, why this is happening, is this a feature of search api to provide separate term option?


--
Regards
Amit

On 17 August 2012 00:30, <general-request-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org> wrote:

Send General mailing list submissions to
        general <at> developer.marklogic.com

To subscribe or unsubscribe via the World Wide Web, visit
        http://developer.marklogic.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
        general-request-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

You can reach the person managing the list at
        general-owner-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of General digest..."

Today's Topics:

   1. Natural language version of a query? (Tim Finney)
   2. Query on multiple language using search api (amit gope)
   3. Re: Natural language version of a query? (Geert Josten)
   4. Re: Query on multiple language using search       api (Geert Josten)
   5. Local-disk forest failover (Danny Sinang)
   6. Re: Local-disk forest failover (Michael Blakeley)
   7. Re: Local-disk forest failover (Wayne Feick)


---------- Forwarded message ----------
From: Tim Finney <tjf-x8A8oWIB5IvR7s880joybQ@public.gmane.org>
To: general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
Cc: 
Date: Wed, 15 Aug 2012 18:29:12 -0300
Subject: [MarkLogic Dev General] Natural language version of a query?
Hi All,

Has anyone here tried to produce a natural language equivalent of a
search string or the kind used in search:search? As an example, here is
an imaginary search string:

cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
date-after:1984-03-01 date-before:1991-05-31

I'd like to end up with something like this:

cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
1984-03-01 AND before 1991-05-31

(Things are complicated by parentheses, NEAR, NOT, ...)

Are there any built-in functions for doing such a thing?

Best,

Tim Finney






---------- Forwarded message ----------
From: amit gope <amitgope2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
Cc: 
Date: Thu, 16 Aug 2012 11:42:18 +0530
Subject: [MarkLogic Dev General] Query on multiple language using search api
Hello All,

Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english. How do i mention the language constraint to include the search for languages de and fr as well?


Regards
Amit




---------- Forwarded message ----------
From: Geert Josten <geert.josten-YDuq3plZH9s@public.gmane.org>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTb0J6uMR7T4w@public.gmane.orglogic.com>
Cc: 
Date: Thu, 16 Aug 2012 10:22:13 +0200
Subject: Re: [MarkLogic Dev General] Natural language version of a query?
Hi Tim,

There is a grammar option in search:search options, but haven't looked
into that myself yet. Perhaps the documentation can make clear whether you
can use that or not.

Alternative is to pre-process the search query yourself. You can try to
tackle it with regex, but it might be more fun to write a grammar for it
and use the handy site maintained by Gunther Rademacher to generate XQuery
code out of it:

http://www.bottlecaps.de/rex/

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van: general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
[mailto:general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org] Namens Tim Finney
Verzonden: woensdag 15 augustus 2012 23:29
Aan: general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
Onderwerp: [MarkLogic Dev General] Natural language version of a query?

Hi All,

Has anyone here tried to produce a natural language equivalent of a search
string or the kind used in search:search? As an example, here is an
imaginary search string:

cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
date-after:1984-03-01 date-before:1991-05-31

I'd like to end up with something like this:

cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
1984-03-01 AND before 1991-05-31

(Things are complicated by parentheses, NEAR, NOT, ...)

Are there any built-in functions for doing such a thing?

Best,

Tim Finney



_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
http://developer.marklogic.com/mailman/listinfo/general



---------- Forwarded message ----------
From: Geert Josten <geert.josten-YDuq3plZH9s@public.gmane.org>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 10:25:46 +0200
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api

Hi Amit,

 

Haven’t tried, but you should be able to add <term-option>lang=en</term-option><term-option>lang=de</term-option><term-option>lang=fr</term-option> to the relevant constraint..

 

Kind regards,

Geert

 

PS: I’m wondering whether it would also accept lang=en,de,fr, but the docs don’t seem to indicate so..

 

Van: general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org [mailto:general-bounces <at> developer.marklogic.com] Namens amit gope
Verzonden: donderdag 16 augustus 2012 8:12
Aan: general <at> developer.marklogic.com
Onderwerp: [MarkLogic Dev General] Query on multiple language using search api

 

Hello All,

Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english. How do i mention the language constraint to include the search for languages de and fr as well?


Regards
Amit



---------- Forwarded message ----------
From: Danny Sinang <d.sinang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: general <General-ld4jwAGwUXTgXEvjvSGRgA@public.gmane.orggic.com>
Cc: 
Date: Thu, 16 Aug 2012 11:00:54 -0400
Subject: [MarkLogic Dev General] Local-disk forest failover
Hi,

 

When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?

 

Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?

 

Regards,

Danny

 

 



---------- Forwarded message ----------
From: Michael Blakeley <mike <at> blakeley.com>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 10:23:30 -0700
Subject: Re: [MarkLogic Dev General] Local-disk forest failover
No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
>
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?
>
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>
> Regards,
> Danny
>
>
> _______________________________________________
> General mailing list
> General-ld4jwAGwUXTgXEvjvSGRgP9FQEyimBiU@public.gmane.orgom
> http://developer.marklogic.com/mailman/listinfo/general




---------- Forwarded message ----------
From: Wayne Feick <Wayne.Feick <at> marklogic.com>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 10:33:39 -0700
Subject: Re: [MarkLogic Dev General] Local-disk forest failover
A slight refinement; replicas are equivalent copies rather than exact copies. You'll have the same fragments, but likely organized differently into stands.

Wayne


Michael Blakeley <mike-dWgsRPgt/GtWk0Htik3J/w@public.gmane.org> wrote:


No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
>
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?
>
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>
> Regards,
> Danny
>
>
> _______________________________________________
> General mailing list
> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General-ld4jwAGwUXRXKVOp+u0EsQ@public.gmane.orgrklogic.com
http://developer.marklogic.com/mailman/listinfo/general


_______________________________________________
General mailing list
General <at> developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general





<div><div class="WordSection1">
<p class="MsoNormal"><span>Hi Amit,</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>From what I read in the docs, the &lt;term&gt; option (which is one of two that allows &lt;term-option&gt;s, &lt;constraint&gt; being the other) is not to apply term-options generally, but specifically for unconstraint searches. So, if you search for something like:</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foo or xx:bar</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Then the term-options within &lt;term&gt; are applied to &lsquo;foo&rsquo;. The term-options within &lt;constraint name=&rdquo;xx&rdquo;&gt; are applied to &lsquo;bar&rsquo;..</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Kind regards,</span></p>
<p class="MsoNormal"><span>Geert </span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Van:</span><span> <a href="mailto:general-bounces@...">general-bounces <at> developer.marklogic.com</a> [mailto:<a href="mailto:general-bounces@...rklogic.com">general-bounces@...</a>] Namens amit gope<br>Verzonden: vrijdag 17 augustus 2012 14:54<br>Aan: <a href="mailto:general@...">general@...</a><br>Onderwerp: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Hi Geert,<br><br>My search options has almost 20 constraints and when i add the term option as unstemmed to be common for all the constaints it doesn't work, but when i provide the term-option value unstemmed to individual constraints then it works, why this is happening, is this a feature of search api to provide separate term option?<br><br><br>-- <br>Regards<br>Amit </p>
<div>
<p class="MsoNormal">On 17 August 2012 00:30, &lt;<a href="mailto:general-request@..." target="_blank">general-request@...</a>&gt; wrote:</p>
<p class="MsoNormal">Send General mailing list submissions to<br>&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general@...">general <at> developer.marklogic.com</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br>or, via email, send a message with subject or body 'help' to<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general-request@...">general-request@...</a><br><br>You can reach the person managing the list at<br>&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general-owner <at> developer.marklogic.com">general-owner@...</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of General digest..."<br><br>Today's Topics:<br><br>&nbsp; &nbsp;1. Natural language version of a query? (Tim Finney)<br>&nbsp; &nbsp;2. Query on multiple language using search api (amit gope)<br>
&nbsp; &nbsp;3. Re: Natural language version of a query? (Geert Josten)<br>&nbsp; &nbsp;4. Re: Query on multiple language using search &nbsp; &nbsp; &nbsp; api (Geert Josten)<br>&nbsp; &nbsp;5. Local-disk forest failover (Danny Sinang)<br>&nbsp; &nbsp;6. Re: Local-disk forest failover (Michael Blakeley)<br>
&nbsp; &nbsp;7. Re: Local-disk forest failover (Wayne Feick)<br><br><br>---------- Forwarded message ----------<br>From:&nbsp;Tim Finney &lt;<a href="mailto:tjf@...">tjf@...</a>&gt;<br>To:&nbsp;<a href="mailto:general <at> developer.marklogic.com">general@...</a><br>
Cc:&nbsp;<br>Date:&nbsp;Wed, 15 Aug 2012 18:29:12 -0300<br>Subject:&nbsp;[MarkLogic Dev General] Natural language version of a query?<br>Hi All,<br><br>Has anyone here tried to produce a natural language equivalent of a<br>search string or the kind used in search:search? As an example, here is<br>
an imaginary search string:<br><br>cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")<br>date-after:1984-03-01 date-before:1991-05-31<br><br>I'd like to end up with something like this:<br><br>cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after<br>1984-03-01 AND before 1991-05-31<br><br>(Things are complicated by parentheses, NEAR, NOT, ...)<br><br>Are there any built-in functions for doing such a thing?<br><br>Best,<br><br>Tim Finney<br><br><br><br><br><br><br>---------- Forwarded message ----------<br>From:&nbsp;amit gope &lt;<a href="mailto:amitgope2 <at> gmail.com">amitgope2@...</a>&gt;<br>To:&nbsp;<a href="mailto:general <at> developer.marklogic.com">general@...</a><br>
Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 11:42:18 +0530<br>Subject:&nbsp;[MarkLogic Dev General] Query on multiple language using search api<br>Hello All,<br><br>Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english. How do i mention the language constraint to include the search for languages de and fr as well?<br clear="all"><br><br>Regards<br>Amit <br><br><br><br><br>---------- Forwarded message ----------<br>From:&nbsp;Geert Josten &lt;<a href="mailto:geert.josten <at> dayon.nl">geert.josten@...</a>&gt;<br>To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general@...">general@...logic.com</a>&gt;<br>
Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 10:22:13 +0200<br>Subject:&nbsp;Re: [MarkLogic Dev General] Natural language version of a query?<br>Hi Tim,<br><br>There is a grammar option in search:search options, but haven't looked<br>into that myself yet. Perhaps the documentation can make clear whether you<br>
can use that or not.<br><br>Alternative is to pre-process the search query yourself. You can try to<br>tackle it with regex, but it might be more fun to write a grammar for it<br>and use the handy site maintained by Gunther Rademacher to generate XQuery<br>
code out of it:<br><br><a href="http://www.bottlecaps.de/rex/" target="_blank">http://www.bottlecaps.de/rex/</a><br><br>Kind regards,<br>Geert<br><br>-----Oorspronkelijk bericht-----<br>Van: <a href="mailto:general-bounces@...">general-bounces@...</a><br>
[mailto:<a href="mailto:general-bounces@...">general-bounces@...</a>] Namens Tim Finney<br>Verzonden: woensdag 15 augustus 2012 23:29<br>Aan: <a href="mailto:general@...ogic.com">general@...</a><br>
Onderwerp: [MarkLogic Dev General] Natural language version of a query?<br><br>Hi All,<br><br>Has anyone here tried to produce a natural language equivalent of a search<br>string or the kind used in search:search? As an example, here is an<br>
imaginary search string:<br><br>cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")<br>date-after:1984-03-01 date-before:1991-05-31<br><br>I'd like to end up with something like this:<br><br>
cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after<br>1984-03-01 AND before 1991-05-31<br><br>(Things are complicated by parentheses, NEAR, NOT, ...)<br><br>Are there any built-in functions for doing such a thing?<br><br>Best,<br><br>Tim Finney<br><br><br><br>_______________________________________________<br>General mailing list<br><a href="mailto:General <at> developer.marklogic.com">General@...</a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br><br><br>---------- Forwarded message ----------<br>From:&nbsp;Geert Josten &lt;<a href="mailto:geert.josten@...">geert.josten@...</a>&gt;<br>To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 10:25:46 +0200<br>Subject:&nbsp;Re: [MarkLogic Dev General] Query on multiple language using search api</p>
<div><div>
<p class="MsoNormal"><span>Hi Amit,</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Haven&rsquo;t tried, but you should be able to add &lt;term-option&gt;lang=en&lt;/term-option&gt;&lt;term-option&gt;lang=de&lt;/term-option&gt;&lt;term-option&gt;lang=fr&lt;/term-option&gt; to the relevant constraint..</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Kind regards,</span></p>
<p class="MsoNormal"><span>Geert</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>PS: I&rsquo;m wondering whether it would also accept lang=en,de,fr, but the docs don&rsquo;t seem to indicate so..</span></p>
<p class="MsoNormal"><span>&nbsp;</span></p>
<p class="MsoNormal"><span>Van:</span><span> <a href="mailto:general-bounces@..." target="_blank">general-bounces@...</a> [mailto:<a href="mailto:general-bounces@..." target="_blank">general-bounces <at> developer.marklogic.com</a>] Namens amit gope<br>Verzonden: donderdag 16 augustus 2012 8:12<br>Aan: <a href="mailto:general@..." target="_blank">general <at> developer.marklogic.com</a><br>Onderwerp: [MarkLogic Dev General] Query on multiple language using search api</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Hello All,<br><br>Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english. How do i mention the language constraint to include the search for languages de and fr as well?<br clear="all"><br><br>Regards<br>Amit </p>
</div></div>
<p class="MsoNormal"><br><br>---------- Forwarded message ----------<br>From:&nbsp;Danny Sinang &lt;<a href="mailto:d.sinang@...">d.sinang@...</a>&gt;<br>To:&nbsp;general &lt;<a href="mailto:General@...">General@...gic.com</a>&gt;<br>
Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 11:00:54 -0400<br>Subject:&nbsp;[MarkLogic Dev General] Local-disk forest failover<br>Hi,</p>
<div><p class="MsoNormal">&nbsp;</p></div>
<div>
<p class="MsoNormal">When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?</p>
</div>
<div><p class="MsoNormal">&nbsp;</p></div>
<div><p class="MsoNormal">Also, will the surviving cluster node try to replicate the new forest to some other cluster members &nbsp;?</p></div>
<div><p class="MsoNormal">&nbsp;</p></div>
<div>
<p class="MsoNormal">Regards,</p>
</div>
<div><p class="MsoNormal">Danny</p></div>
<div><p class="MsoNormal">&nbsp;</p></div>
<div><p class="MsoNormal">&nbsp;</p></div>
<p class="MsoNormal"><br><br>---------- Forwarded message ----------<br>
From:&nbsp;Michael Blakeley &lt;<a href="mailto:mike@...">mike <at> blakeley.com</a>&gt;<br>To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general@...">general@...</a>&gt;<br>
Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 10:23:30 -0700<br>Subject:&nbsp;Re: [MarkLogic Dev General] Local-disk forest failover<br>No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.<br><br>This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.<br><br>-- Mike<br><br>On 16 Aug 2012, at 08:00 , Danny Sinang wrote:<br><br>&gt; Hi,<br>&gt;<br>&gt; When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?<br>&gt;<br>&gt; Also, will the surviving cluster node try to replicate the new forest to some other cluster members &nbsp;?<br>
&gt;<br>&gt; Regards,<br>&gt; Danny<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; General mailing list<br>&gt; <a href="mailto:General@...">General@...om</a><br>
&gt; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br><br><br><br>---------- Forwarded message ----------<br>From:&nbsp;Wayne Feick &lt;<a href="mailto:Wayne.Feick@...">Wayne.Feick <at> marklogic.com</a>&gt;<br>
To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>Cc:&nbsp;<br>Date:&nbsp;Thu, 16 Aug 2012 10:33:39 -0700<br>Subject:&nbsp;Re: [MarkLogic Dev General] Local-disk forest failover<br>
A slight refinement; replicas are equivalent copies rather than exact copies. You'll have the same fragments, but likely organized differently into stands.<br><br>Wayne<br><br><br>Michael Blakeley &lt;<a href="mailto:mike@...">mike@...</a>&gt; wrote:<br><br><br>No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.<br><br>This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.<br><br>-- Mike<br><br>On 16 Aug 2012, at 08:00 , Danny Sinang wrote:<br><br>&gt; Hi,<br>&gt;<br>&gt; When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?<br>&gt;<br>
&gt; Also, will the surviving cluster node try to replicate the new forest to some other cluster members &nbsp;?<br>&gt;<br>&gt; Regards,<br>&gt; Danny<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>
&gt; General mailing list<br>&gt; <a href="mailto:General@...ogic.com">General@...</a><br>&gt; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br>_______________________________________________<br>General mailing list<br><a href="mailto:General@...">General@...rklogic.com</a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br><br>_______________________________________________<br>General mailing list<br><a href="mailto:General@...">General <at> developer.marklogic.com</a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a></p>
</div>
<p class="MsoNormal"><br><br clear="all"><br><br></p>
</div></div>
Steiner, David J. (LNG-DAY | 17 Oct 2012 18:08
Picon

Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Here’s a similar situation:

Using 4.1,

I have an unstemmed database.  However the user searching it occasionally know she/he wants to search for the stemmed version of one of their terms.

The “term” option applies to all terms in a document and the constraint would only apply to specific element(s) for value or word.

 

I want to do something like allow: blue AND green AND stemmed:ran

That is, I want to search the entire document for unstemmed versions of “blue” and “green” and the stemmed version of “ran.”

 

However, I’m not really seeing how to construct that constraint without simply listing all elements of a document in the constraint.

 

<options xmlns="http://marklogic.com/appservices/search">

  <constraint name="stemmed">

  <word>

      <term-option>stemmed</term-option>

      <element name="my-element1"/>

    </word>

    <word>

      <term-option>stemmed</term-option>

      <element name="my-element2"/>

    </word>

  </constraint>

 

Which actually appears to not be allowed – you can only get one element in word or only one word in a constraint (even though check-options gives no error).  When I try this I get:

  [1.0-ml] XDMP-ARGTYPE: (err:XPTY0004) fn:QName("", (xs:NCName("my-element1"), xs:NCName("my-element2"))) -- arg2 is not of type xs:string

 

 

So,

1)      Does this even work, perhaps in a later version of ML?

2)      Is there a better/easier way to do what I’m trying to do?

3)      I suppose I could create a field that is made up of every element then use that field in the constraint?

 

 

Thanks,
David

 

 

 

From: general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org [mailto:general-bounces-ld4jwAGwUXTgXEvjvSGRgEPhkuQigjxi@public.gmane.org.com] On Behalf Of Geert Josten
Sent: Friday, August 17, 2012 9:37 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

 

Hi Amit,

 

From what I read in the docs, the <term> option (which is one of two that allows <term-option>s, <constraint> being the other) is not to apply term-options generally, but specifically for unconstraint searches. So, if you search for something like:

 

               foo or xx:bar

 

Then the term-options within <term> are applied to ‘foo’. The term-options within <constraint name=”xx”> are applied to ‘bar’..

 

Kind regards,

Geert

 

Van: general-bounces <at> developer.marklogic.com [mailto:general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org] Namens amit gope
Verzonden: vrijdag 17 augustus 2012 14:54
Aan: general <at> developer.marklogic.com
Onderwerp: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

 

Hi Geert,

My search options has almost 20 constraints and when i add the term option as unstemmed to be common for all the constaints it doesn't work, but when i provide the term-option value unstemmed to individual constraints then it works, why this is happening, is this a feature of search api to provide separate term option?


--
Regards
Amit

On 17 August 2012 00:30, <general-request-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org> wrote:

Send General mailing list submissions to
        general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://developer.marklogic.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
        general-request-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

You can reach the person managing the list at
        general-owner-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of General digest..."

Today's Topics:

   1. Natural language version of a query? (Tim Finney)
   2. Query on multiple language using search api (amit gope)
   3. Re: Natural language version of a query? (Geert Josten)
   4. Re: Query on multiple language using search       api (Geert Josten)
   5. Local-disk forest failover (Danny Sinang)
   6. Re: Local-disk forest failover (Michael Blakeley)
   7. Re: Local-disk forest failover (Wayne Feick)


---------- Forwarded message ----------
From: Tim Finney <tjf-x8A8oWIB5ItNg+MwTxZMZA@public.gmane.orgt>
To: general <at> developer.marklogic.com
Cc: 
Date: Wed, 15 Aug 2012 18:29:12 -0300
Subject: [MarkLogic Dev General] Natural language version of a query?
Hi All,

Has anyone here tried to produce a natural language equivalent of a
search string or the kind used in search:search? As an example, here is
an imaginary search string:

cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
date-after:1984-03-01 date-before:1991-05-31

I'd like to end up with something like this:

cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
1984-03-01 AND before 1991-05-31

(Things are complicated by parentheses, NEAR, NOT, ...)

Are there any built-in functions for doing such a thing?

Best,

Tim Finney






---------- Forwarded message ----------
From: amit gope <amitgope2 <at> gmail.com>
To: general <at> developer.marklogic.com
Cc: 
Date: Thu, 16 Aug 2012 11:42:18 +0530
Subject: [MarkLogic Dev General] Query on multiple language using search api
Hello All,

Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english. How do i mention the language constraint to include the search for languages de and fr as well?


Regards
Amit




---------- Forwarded message ----------
From: Geert Josten <geert.josten-YDuq3plZH9s@public.gmane.org>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 10:22:13 +0200
Subject: Re: [MarkLogic Dev General] Natural language version of a query?
Hi Tim,

There is a grammar option in search:search options, but haven't looked
into that myself yet. Perhaps the documentation can make clear whether you
can use that or not.

Alternative is to pre-process the search query yourself. You can try to
tackle it with regex, but it might be more fun to write a grammar for it
and use the handy site maintained by Gunther Rademacher to generate XQuery
code out of it:

http://www.bottlecaps.de/rex/

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van: general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
[mailto:general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org] Namens Tim Finney
Verzonden: woensdag 15 augustus 2012 23:29
Aan: general <at> developer.marklogic.com
Onderwerp: [MarkLogic Dev General] Natural language version of a query?

Hi All,

Has anyone here tried to produce a natural language equivalent of a search
string or the kind used in search:search? As an example, here is an
imaginary search string:

cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
date-after:1984-03-01 date-before:1991-05-31

I'd like to end up with something like this:

cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
1984-03-01 AND before 1991-05-31

(Things are complicated by parentheses, NEAR, NOT, ...)

Are there any built-in functions for doing such a thing?

Best,

Tim Finney



_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgA@public.gmane.orggic.com
http://developer.marklogic.com/mailman/listinfo/general



---------- Forwarded message ----------
From: Geert Josten <geert.josten-YDuq3plZH9s@public.gmane.org>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 10:25:46 +0200
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api

Hi Amit,

 

Haven’t tried, but you should be able to add <term-option>lang=en</term-option><term-option>lang=de</term-option><term-option>lang=fr</term-option> to the relevant constraint..

 

Kind regards,

Geert

 

PS: I’m wondering whether it would also accept lang=en,de,fr, but the docs don’t seem to indicate so..

 

Van: general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org [mailto:general-bounces <at> developer.marklogic.com] Namens amit gope
Verzonden: donderdag 16 augustus 2012 8:12
Aan: general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
Onderwerp: [MarkLogic Dev General] Query on multiple language using search api

 

Hello All,

Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english. How do i mention the language constraint to include the search for languages de and fr as well?


Regards
Amit



---------- Forwarded message ----------
From: Danny Sinang <d.sinang <at> gmail.com>
To: general <General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 11:00:54 -0400
Subject: [MarkLogic Dev General] Local-disk forest failover
Hi,

 

When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?

 

Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?

 

Regards,

Danny

 

 



---------- Forwarded message ----------
From: Michael Blakeley <mike <at> blakeley.com>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 10:23:30 -0700
Subject: Re: [MarkLogic Dev General] Local-disk forest failover
No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
>
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?
>
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>
> Regards,
> Danny
>
>
> _______________________________________________
> General mailing list
> General <at> developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general




---------- Forwarded message ----------
From: Wayne Feick <Wayne.Feick-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org>
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Cc: 
Date: Thu, 16 Aug 2012 10:33:39 -0700
Subject: Re: [MarkLogic Dev General] Local-disk forest failover
A slight refinement; replicas are equivalent copies rather than exact copies. You'll have the same fragments, but likely organized differently into stands.

Wayne


Michael Blakeley <mike-dWgsRPgt/GtWk0Htik3J/w@public.gmane.org> wrote:


No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
>
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?
>
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>
> Regards,
> Danny
>
>
> _______________________________________________
> General mailing list
> General <at> developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgA@public.gmane.orggic.com
http://developer.marklogic.com/mailman/listinfo/general


_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgA@public.gmane.orggic.com
http://developer.marklogic.com/mailman/listinfo/general



<div>
<div class="WordSection1">
<p class="MsoNormal"><span>Here&rsquo;s a similar situation:<p></p></span></p>
<p class="MsoNormal"><span>Using 4.1,<p></p></span></p>
<p class="MsoNormal"><span>I have an unstemmed database.&nbsp; However the user searching it occasionally know she/he wants to search for the stemmed version of one of their terms.<p></p></span></p>
<p class="MsoNormal"><span>The &ldquo;term&rdquo; option applies to all terms in a document and the constraint would only apply to specific element(s) for value or word.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>I want to do something like allow: blue AND green AND stemmed:ran<p></p></span></p>
<p class="MsoNormal"><span>That is, I want to search the entire document for unstemmed versions of &ldquo;blue&rdquo; and &ldquo;green&rdquo; and the stemmed version of &ldquo;ran.&rdquo;<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>However, I&rsquo;m not really seeing how to construct that constraint without simply listing all elements of a document in the constraint.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN">&lt;options xmlns="http://marklogic.com/appservices/search"&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN">&nbsp; &lt;constraint name="stemmed"&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN">&nbsp; &lt;word&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span>&lt;term-option&gt;stemmed&lt;/term-option&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;element name="my-element1"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN">&nbsp;&nbsp;&nbsp; &lt;/word&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN">&nbsp;&nbsp;&nbsp; &lt;word&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;term-option&gt;stemmed&lt;/term-option&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;element name="my-element2"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN">&nbsp;&nbsp;&nbsp; &lt;/word&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN">&hellip;<p></p></span></p>
<p class="MsoNormal"><span lang="EN">&nbsp; &lt;/constraint&gt;
<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Which actually appears to not be allowed &ndash; you can only get one element in word or only one word in a constraint (even though check-options gives no error).&nbsp;
 When I try this I get: <p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;[1.0-ml] XDMP-ARGTYPE: (err:XPTY0004) fn:QName("", (xs:NCName("</span><span lang="EN">my-element1</span><span>"),
 xs:NCName("</span><span lang="EN">my-element2</span><span>"))) -- arg2 is not of type xs:string<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>So,<p></p></span></p>
<p class="MsoListParagraph"><span><span>1)<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><span>Does this even work, perhaps in a later version of ML?<p></p></span></p>
<p class="MsoListParagraph"><span><span>2)<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><span>Is there a better/easier way to do what I&rsquo;m trying to do?<p></p></span></p>
<p class="MsoListParagraph"><span><span>3)<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><span>I suppose I could create a field that is made up of every element then use that field in the constraint?<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Thanks,<br>
David<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<div>
<div>
<p class="MsoNormal"><span>From:</span><span> general-bounces@... [mailto:general-bounces@....com]
On Behalf Of Geert Josten<br>Sent: Friday, August 17, 2012 9:37 AM<br>To: MarkLogic Developer Discussion<br>Subject: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)<p></p></span></p>
</div>
</div>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><span lang="NL">Hi Amit,</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">From what I read in the docs, the &lt;term&gt; option (which is one of two that allows &lt;term-option&gt;s, &lt;constraint&gt; being the other) is not to apply term-options
 generally, but specifically for unconstraint searches. So, if you search for something like:</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foo or xx:bar</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">Then the term-options within &lt;term&gt; are applied to &lsquo;foo&rsquo;. The term-options within &lt;constraint name=&rdquo;xx&rdquo;&gt; are applied to &lsquo;bar&rsquo;..</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">Kind regards,</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">Geert
</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">Van:</span><span lang="NL">
<a href="mailto:general-bounces@...">general-bounces <at> developer.marklogic.com</a> [mailto:<a href="mailto:general-bounces <at> developer.marklogic.com">general-bounces@...</a>]
Namens amit gope<br>Verzonden: vrijdag 17 augustus 2012 14:54<br>Aan: <a href="mailto:general@...">general <at> developer.marklogic.com</a><br>Onderwerp: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;<p></p></span></p>
<p class="MsoNormal"><span lang="NL">Hi Geert,<br><br>
My search options has almost 20 constraints and when i add the term option as unstemmed to be common for all the constaints it doesn't work, but when i provide the term-option value unstemmed to individual constraints then it works, why this is happening, is
 this a feature of search api to provide separate term option?<br><br><br>
-- <br>
Regards<br>
Amit <p></p></span></p>
<div>
<p class="MsoNormal"><span lang="NL">On 17 August 2012 00:30, &lt;<a href="mailto:general-request@..." target="_blank">general-request@...</a>&gt; wrote:<p></p></span></p>
<p class="MsoNormal"><span lang="NL">Send General mailing list submissions to<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general@...om">general@...</a><br><br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">
http://developer.marklogic.com/mailman/listinfo/general</a><br>
or, via email, send a message with subject or body 'help' to<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general-request@...klogic.com">general-request@...</a><br><br>
You can reach the person managing the list at<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general-owner@...ogic.com">general-owner@...</a><br><br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of General digest..."<br><br>
Today's Topics:<br><br>
&nbsp; &nbsp;1. Natural language version of a query? (Tim Finney)<br>
&nbsp; &nbsp;2. Query on multiple language using search api (amit gope)<br>
&nbsp; &nbsp;3. Re: Natural language version of a query? (Geert Josten)<br>
&nbsp; &nbsp;4. Re: Query on multiple language using search &nbsp; &nbsp; &nbsp; api (Geert Josten)<br>
&nbsp; &nbsp;5. Local-disk forest failover (Danny Sinang)<br>
&nbsp; &nbsp;6. Re: Local-disk forest failover (Michael Blakeley)<br>
&nbsp; &nbsp;7. Re: Local-disk forest failover (Wayne Feick)<br><br><br>
---------- Forwarded message ----------<br>
From:&nbsp;Tim Finney &lt;<a href="mailto:tjf@...">tjf@...t</a>&gt;<br>
To:&nbsp;<a href="mailto:general@...">general <at> developer.marklogic.com</a><br>
Cc:&nbsp;<br>
Date:&nbsp;Wed, 15 Aug 2012 18:29:12 -0300<br>
Subject:&nbsp;[MarkLogic Dev General] Natural language version of a query?<br>
Hi All,<br><br>
Has anyone here tried to produce a natural language equivalent of a<br>
search string or the kind used in search:search? As an example, here is<br>
an imaginary search string:<br><br>
cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")<br>
date-after:1984-03-01 date-before:1991-05-31<br><br>
I'd like to end up with something like this:<br><br>
cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after<br>
1984-03-01 AND before 1991-05-31<br><br>
(Things are complicated by parentheses, NEAR, NOT, ...)<br><br>
Are there any built-in functions for doing such a thing?<br><br>
Best,<br><br>
Tim Finney<br><br><br><br><br><br><br>
---------- Forwarded message ----------<br>
From:&nbsp;amit gope &lt;<a href="mailto:amitgope2@...">amitgope2 <at> gmail.com</a>&gt;<br>
To:&nbsp;<a href="mailto:general@...">general <at> developer.marklogic.com</a><br>
Cc:&nbsp;<br>
Date:&nbsp;Thu, 16 Aug 2012 11:42:18 +0530<br>
Subject:&nbsp;[MarkLogic Dev General] Query on multiple language using search api<br>
Hello All,<br><br>
Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english.
 How do i mention the language constraint to include the search for languages de and fr as well?<br clear="all"><br><br>
Regards<br>
Amit <br><br><br><br><br>
---------- Forwarded message ----------<br>
From:&nbsp;Geert Josten &lt;<a href="mailto:geert.josten@...">geert.josten@...</a>&gt;<br>
To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Cc:&nbsp;<br>
Date:&nbsp;Thu, 16 Aug 2012 10:22:13 +0200<br>
Subject:&nbsp;Re: [MarkLogic Dev General] Natural language version of a query?<br>
Hi Tim,<br><br>
There is a grammar option in search:search options, but haven't looked<br>
into that myself yet. Perhaps the documentation can make clear whether you<br>
can use that or not.<br><br>
Alternative is to pre-process the search query yourself. You can try to<br>
tackle it with regex, but it might be more fun to write a grammar for it<br>
and use the handy site maintained by Gunther Rademacher to generate XQuery<br>
code out of it:<br><br><a href="http://www.bottlecaps.de/rex/" target="_blank">http://www.bottlecaps.de/rex/</a><br><br>
Kind regards,<br>
Geert<br><br>
-----Oorspronkelijk bericht-----<br>
Van: <a href="mailto:general-bounces@...">general-bounces@...</a><br>
[mailto:<a href="mailto:general-bounces@...">general-bounces@...</a>] Namens Tim Finney<br>
Verzonden: woensdag 15 augustus 2012 23:29<br>
Aan: <a href="mailto:general@...">general <at> developer.marklogic.com</a><br>
Onderwerp: [MarkLogic Dev General] Natural language version of a query?<br><br>
Hi All,<br><br>
Has anyone here tried to produce a natural language equivalent of a search<br>
string or the kind used in search:search? As an example, here is an<br>
imaginary search string:<br><br>
cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")<br>
date-after:1984-03-01 date-before:1991-05-31<br><br>
I'd like to end up with something like this:<br><br>
cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after<br>
1984-03-01 AND before 1991-05-31<br><br>
(Things are complicated by parentheses, NEAR, NOT, ...)<br><br>
Are there any built-in functions for doing such a thing?<br><br>
Best,<br><br>
Tim Finney<br><br><br><br>
_______________________________________________<br>
General mailing list<br><a href="mailto:General@...">General@...gic.com</a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br><br><br>
---------- Forwarded message ----------<br>
From:&nbsp;Geert Josten &lt;<a href="mailto:geert.josten@...">geert.josten@...</a>&gt;<br>
To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Cc:&nbsp;<br>
Date:&nbsp;Thu, 16 Aug 2012 10:25:46 +0200<br>
Subject:&nbsp;Re: [MarkLogic Dev General] Query on multiple language using search api<p></p></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="NL">Hi Amit,</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">Haven&rsquo;t tried, but you should be able to add &lt;term-option&gt;lang=en&lt;/term-option&gt;&lt;term-option&gt;lang=de&lt;/term-option&gt;&lt;term-option&gt;lang=fr&lt;/term-option&gt;
 to the relevant constraint..</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">Kind regards,</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">Geert</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">PS: I&rsquo;m wondering whether it would also accept lang=en,de,fr, but the docs don&rsquo;t seem to indicate so..</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">Van:</span><span lang="NL">
<a href="mailto:general-bounces@..." target="_blank">general-bounces@...</a> [mailto:<a href="mailto:general-bounces@..." target="_blank">general-bounces <at> developer.marklogic.com</a>]
Namens amit gope<br>Verzonden: donderdag 16 augustus 2012 8:12<br>Aan: <a href="mailto:general@..." target="_blank">general@...</a><br>Onderwerp: [MarkLogic Dev General] Query on multiple language using search api</span><span lang="NL"><p></p></span></p>
<p class="MsoNormal"><span lang="NL">&nbsp;<p></p></span></p>
<p class="MsoNormal"><span lang="NL">Hello All,<br><br>
Can anyone please help me out queering on multiple languages using search api. In my database i have documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language specification it returns me contents from only english.
 How do i mention the language constraint to include the search for languages de and fr as well?<br clear="all"><br><br>
Regards<br>
Amit <p></p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="NL"><br><br>
---------- Forwarded message ----------<br>
From:&nbsp;Danny Sinang &lt;<a href="mailto:d.sinang@...">d.sinang <at> gmail.com</a>&gt;<br>
To:&nbsp;general &lt;<a href="mailto:General@...">General@...</a>&gt;<br>
Cc:&nbsp;<br>
Date:&nbsp;Thu, 16 Aug 2012 11:00:54 -0400<br>
Subject:&nbsp;[MarkLogic Dev General] Local-disk forest failover<br>
Hi,<p></p></span></p>
<div>
<p class="MsoNormal"><span lang="NL">&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="NL">When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="NL">&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="NL">Also, will the surviving cluster node try to replicate the new forest to some other cluster members &nbsp;?<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="NL">&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="NL">Regards,<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="NL">Danny<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="NL">&nbsp;<p></p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="NL">&nbsp;<p></p></span></p>
</div>
<p class="MsoNormal"><span lang="NL"><br><br>
---------- Forwarded message ----------<br>
From:&nbsp;Michael Blakeley &lt;<a href="mailto:mike@...">mike <at> blakeley.com</a>&gt;<br>
To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Cc:&nbsp;<br>
Date:&nbsp;Thu, 16 Aug 2012 10:23:30 -0700<br>
Subject:&nbsp;Re: [MarkLogic Dev General] Local-disk forest failover<br>
No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.<br><br>
This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.<br><br>
-- Mike<br><br>
On 16 Aug 2012, at 08:00 , Danny Sinang wrote:<br><br>
&gt; Hi,<br>
&gt;<br>
&gt; When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?<br>
&gt;<br>
&gt; Also, will the surviving cluster node try to replicate the new forest to some other cluster members &nbsp;?<br>
&gt;<br>
&gt; Regards,<br>
&gt; Danny<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; General mailing list<br>
&gt; <a href="mailto:General@...">General <at> developer.marklogic.com</a><br>
&gt; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">
http://developer.marklogic.com/mailman/listinfo/general</a><br><br><br><br><br>
---------- Forwarded message ----------<br>
From:&nbsp;Wayne Feick &lt;<a href="mailto:Wayne.Feick@...">Wayne.Feick@...</a>&gt;<br>
To:&nbsp;MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Cc:&nbsp;<br>
Date:&nbsp;Thu, 16 Aug 2012 10:33:39 -0700<br>
Subject:&nbsp;Re: [MarkLogic Dev General] Local-disk forest failover<br>
A slight refinement; replicas are equivalent copies rather than exact copies. You'll have the same fragments, but likely organized differently into stands.<br><br>
Wayne<br><br><br>
Michael Blakeley &lt;<a href="mailto:mike@...">mike@...</a>&gt; wrote:<br><br><br>
No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.<br><br>
This underscores the importance of monitoring. You want to find out about a forest failure immediately - not weeks later, when the replica fails and the whole database goes offline.<br><br>
-- Mike<br><br>
On 16 Aug 2012, at 08:00 , Danny Sinang wrote:<br><br>
&gt; Hi,<br>
&gt;<br>
&gt; When a local-disk failover happens, will the replica forest (which just became the primary forest) need to reindex ?<br>
&gt;<br>
&gt; Also, will the surviving cluster node try to replicate the new forest to some other cluster members &nbsp;?<br>
&gt;<br>
&gt; Regards,<br>
&gt; Danny<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; General mailing list<br>
&gt; <a href="mailto:General@...">General <at> developer.marklogic.com</a><br>
&gt; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">
http://developer.marklogic.com/mailman/listinfo/general</a><br><br>
_______________________________________________<br>
General mailing list<br><a href="mailto:General@...">General@...gic.com</a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br><br>
_______________________________________________<br>
General mailing list<br><a href="mailto:General@...">General@...gic.com</a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><p></p></span></p>
</div>
<p class="MsoNormal"><span lang="NL"><br><br clear="all"><p></p></span></p>
</div>
</div>
Colleen Whitney | 17 Oct 2012 18:34

Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

David, although 3) would work, I think the easiest way to do it is to write a custom constraint that
constructs a stemmed word query.  There are good instructions for implementing a custom constraint in the
Search Developer's Guide.  I will say that there were some conveniences added (I think in 4.2) that made it
easier to write custom constraints than in 4.1, so if you have the option of moving to a more recent version,
that's worth considering.

--Colleen
________________________________________
From: general-bounces@...
[general-bounces@...rklogic.com] On Behalf Of Steiner,
David J. (LNG-DAY) [David.J.Steiner <at> elsevier.com]
Sent: Wednesday, October 17, 2012 9:08 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Here’s a similar situation:
Using 4.1,
I have an unstemmed database.  However the user searching it occasionally know she/he wants to search for
the stemmed version of one of their terms.
The “term” option applies to all terms in a document and the constraint would only apply to specific
element(s) for value or word.

I want to do something like allow: blue AND green AND stemmed:ran
That is, I want to search the entire document for unstemmed versions of “blue” and “green” and the
stemmed version of “ran.”

However, I’m not really seeing how to construct that constraint without simply listing all elements of a
document in the constraint.

<options xmlns="http://marklogic.com/appservices/search">
  <constraint name="stemmed">
  <word>
      <term-option>stemmed</term-option>
      <element name="my-element1"/>
    </word>
    <word>
      <term-option>stemmed</term-option>
      <element name="my-element2"/>
    </word>
…
  </constraint>

Which actually appears to not be allowed – you can only get one element in word or only one word in a
constraint (even though check-options gives no error).  When I try this I get:
  [1.0-ml] XDMP-ARGTYPE: (err:XPTY0004) fn:QName("", (xs:NCName("my-element1"),
xs:NCName("my-element2"))) -- arg2 is not of type xs:string

So,

1)      Does this even work, perhaps in a later version of ML?

2)      Is there a better/easier way to do what I’m trying to do?

3)      I suppose I could create a field that is made up of every element then use that field in the constraint?

Thanks,
David

From: general-bounces@...
[mailto:general-bounces <at> developer.marklogic.com] On Behalf Of Geert Josten
Sent: Friday, August 17, 2012 9:37 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Hi Amit,

>From what I read in the docs, the <term> option (which is one of two that allows <term-option>s,
<constraint> being the other) is not to apply term-options generally, but specifically for
unconstraint searches. So, if you search for something like:

               foo or xx:bar

Then the term-options within <term> are applied to ‘foo’. The term-options within <constraint
name=”xx”> are applied to ‘bar’..

Kind regards,
Geert

Van:
general-bounces@...<mailto:general-bounces <at> developer.marklogic.com>
[mailto:general-bounces@...<mailto:general-bounces@...>]
Namens amit gope
Verzonden: vrijdag 17 augustus 2012 14:54
Aan: general@...<mailto:general@...>
Onderwerp: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Hi Geert,

My search options has almost 20 constraints and when i add the term option as unstemmed to be common for all
the constaints it doesn't work, but when i provide the term-option value unstemmed to individual
constraints then it works, why this is happening, is this a feature of search api to provide separate term option?

--
Regards
Amit
On 17 August 2012 00:30,
<general-request@...<mailto:general-request@...>> wrote:
Send General mailing list submissions to
        general@...<mailto:general@...com>

To subscribe or unsubscribe via the World Wide Web, visit
        http://developer.marklogic.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
        general-request@...<mailto:general-request <at> developer.marklogic.com>

You can reach the person managing the list at
        general-owner@...<mailto:general-owner <at> developer.marklogic.com>

When replying, please edit your Subject line so it is more specific
than "Re: Contents of General digest..."

Today's Topics:

   1. Natural language version of a query? (Tim Finney)
   2. Query on multiple language using search api (amit gope)
   3. Re: Natural language version of a query? (Geert Josten)
   4. Re: Query on multiple language using search       api (Geert Josten)
   5. Local-disk forest failover (Danny Sinang)
   6. Re: Local-disk forest failover (Michael Blakeley)
   7. Re: Local-disk forest failover (Wayne Feick)

---------- Forwarded message ----------
From: Tim Finney <tjf@...<mailto:tjf@...>>
To: general@...<mailto:general@...>
Cc:
Date: Wed, 15 Aug 2012 18:29:12 -0300
Subject: [MarkLogic Dev General] Natural language version of a query?
Hi All,

Has anyone here tried to produce a natural language equivalent of a
search string or the kind used in search:search? As an example, here is
an imaginary search string:

cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
date-after:1984-03-01 date-before:1991-05-31

I'd like to end up with something like this:

cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
1984-03-01 AND before 1991-05-31

(Things are complicated by parentheses, NEAR, NOT, ...)

Are there any built-in functions for doing such a thing?

Best,

Tim Finney

---------- Forwarded message ----------
From: amit gope <amitgope2@...<mailto:amitgope2@...>>
To: general@...<mailto:general@...>
Cc:
Date: Thu, 16 Aug 2012 11:42:18 +0530
Subject: [MarkLogic Dev General] Query on multiple language using search api
Hello All,

Can anyone please help me out queering on multiple languages using search api. In my database i have
documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language
specification it returns me contents from only english. How do i mention the language constraint to
include the search for languages de and fr as well?

Regards
Amit

---------- Forwarded message ----------
From: Geert Josten <geert.josten@...<mailto:geert.josten@...>>
To: MarkLogic Developer Discussion <general@...<mailto:general@...>>
Cc:
Date: Thu, 16 Aug 2012 10:22:13 +0200
Subject: Re: [MarkLogic Dev General] Natural language version of a query?
Hi Tim,

There is a grammar option in search:search options, but haven't looked
into that myself yet. Perhaps the documentation can make clear whether you
can use that or not.

Alternative is to pre-process the search query yourself. You can try to
tackle it with regex, but it might be more fun to write a grammar for it
and use the handy site maintained by Gunther Rademacher to generate XQuery
code out of it:

http://www.bottlecaps.de/rex/

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van:
general-bounces@...<mailto:general-bounces <at> developer.marklogic.com>
[mailto:general-bounces@...<mailto:general-bounces <at> developer.marklogic.com>]
Namens Tim Finney
Verzonden: woensdag 15 augustus 2012 23:29
Aan: general@...<mailto:general@...>
Onderwerp: [MarkLogic Dev General] Natural language version of a query?

Hi All,

Has anyone here tried to produce a natural language equivalent of a search
string or the kind used in search:search? As an example, here is an
imaginary search string:

cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
date-after:1984-03-01 date-before:1991-05-31

I'd like to end up with something like this:

cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
1984-03-01 AND before 1991-05-31

(Things are complicated by parentheses, NEAR, NOT, ...)

Are there any built-in functions for doing such a thing?

Best,

Tim Finney

_______________________________________________
General mailing list
General@...<mailto:General@...>
http://developer.marklogic.com/mailman/listinfo/general

---------- Forwarded message ----------
From: Geert Josten <geert.josten@...<mailto:geert.josten@...>>
To: MarkLogic Developer Discussion <general@...<mailto:general@...>>
Cc:
Date: Thu, 16 Aug 2012 10:25:46 +0200
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api
Hi Amit,

Haven’t tried, but you should be able to add
<term-option>lang=en</term-option><term-option>lang=de</term-option><term-option>lang=fr</term-option>
to the relevant constraint..

Kind regards,
Geert

PS: I’m wondering whether it would also accept lang=en,de,fr, but the docs don’t seem to indicate so..

Van:
general-bounces@...<mailto:general-bounces <at> developer.marklogic.com>
[mailto:general-bounces@...<mailto:general-bounces@...>]
Namens amit gope
Verzonden: donderdag 16 augustus 2012 8:12
Aan: general@...<mailto:general@...>
Onderwerp: [MarkLogic Dev General] Query on multiple language using search api

Hello All,

Can anyone please help me out queering on multiple languages using search api. In my database i have
documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language
specification it returns me contents from only english. How do i mention the language constraint to
include the search for languages de and fr as well?

Regards
Amit

---------- Forwarded message ----------
From: Danny Sinang <d.sinang@...<mailto:d.sinang@...>>
To: general <General@...<mailto:General@...ogic.com>>
Cc:
Date: Thu, 16 Aug 2012 11:00:54 -0400
Subject: [MarkLogic Dev General] Local-disk forest failover
Hi,

When a local-disk failover happens, will the replica forest (which just became the primary forest) need to
reindex ?

Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?

Regards,
Danny

---------- Forwarded message ----------
From: Michael Blakeley <mike@...<mailto:mike@...>>
To: MarkLogic Developer Discussion <general@...<mailto:general@...>>
Cc:
Date: Thu, 16 Aug 2012 10:23:30 -0700
Subject: Re: [MarkLogic Dev General] Local-disk forest failover
No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately -
not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
>
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
>
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>
> Regards,
> Danny
>
>
> _______________________________________________
> General mailing list
> General@...<mailto:General@...>
> http://developer.marklogic.com/mailman/listinfo/general

---------- Forwarded message ----------
From: Wayne Feick <Wayne.Feick@...<mailto:Wayne.Feick <at> marklogic.com>>
To: MarkLogic Developer Discussion <general@...<mailto:general@...>>
Cc:
Date: Thu, 16 Aug 2012 10:33:39 -0700
Subject: Re: [MarkLogic Dev General] Local-disk forest failover
A slight refinement; replicas are equivalent copies rather than exact copies. You'll have the same
fragments, but likely organized differently into stands.

Wayne

Michael Blakeley
<mike@...<mailto:mike@...>> wrote:

No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately -
not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
>
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
>
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>
> Regards,
> Danny
>
>
> _______________________________________________
> General mailing list
> General@...<mailto:General@...>
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General@...<mailto:General@...>
http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General@...<mailto:General@...>
http://developer.marklogic.com/mailman/listinfo/general

Steiner, David J. (LNG-DAY | 17 Oct 2012 20:22
Picon

Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Thanks Colleen,

I think I'll have to look into the custom constraint for getting it to work in 4.1. 
Mike Blakeley's suggestion works in 6.0, but not 4.1, so I will check out the search.xqy code and see if I
can't glean the appropriate code from that to put in a custom constraint that'll work in 4.1.
Sometimes just upgrading isn't an option... :-)

David

-----Original Message-----
From: general-bounces@...
[mailto:general-bounces@...] On Behalf Of
Colleen Whitney
Sent: Wednesday, October 17, 2012 12:34 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

David, although 3) would work, I think the easiest way to do it is to write a custom constraint that
constructs a stemmed word query.  There are good instructions for implementing a custom constraint in the
Search Developer's Guide.  I will say that there were some conveniences added (I think in 4.2) that made it
easier to write custom constraints than in 4.1, so if you have the option of moving to a more recent version,
that's worth considering.

--Colleen
________________________________________
From: general-bounces@...
[general-bounces@...] On Behalf Of Steiner,
David J. (LNG-DAY) [David.J.Steiner@...]
Sent: Wednesday, October 17, 2012 9:08 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Here's a similar situation:
Using 4.1,
I have an unstemmed database.  However the user searching it occasionally know she/he wants to search for
the stemmed version of one of their terms.
The "term" option applies to all terms in a document and the constraint would only apply to specific
element(s) for value or word.

I want to do something like allow: blue AND green AND stemmed:ran That is, I want to search the entire
document for unstemmed versions of "blue" and "green" and the stemmed version of "ran."

However, I'm not really seeing how to construct that constraint without simply listing all elements of a
document in the constraint.

<options xmlns="http://marklogic.com/appservices/search">
  <constraint name="stemmed">
  <word>
      <term-option>stemmed</term-option>
      <element name="my-element1"/>
    </word>
    <word>
      <term-option>stemmed</term-option>
      <element name="my-element2"/>
    </word>
...
  </constraint>

Which actually appears to not be allowed - you can only get one element in word or only one word in a constraint
(even though check-options gives no error).  When I try this I get:
  [1.0-ml] XDMP-ARGTYPE: (err:XPTY0004) fn:QName("", (xs:NCName("my-element1"),
xs:NCName("my-element2"))) -- arg2 is not of type xs:string

So,

1)      Does this even work, perhaps in a later version of ML?

2)      Is there a better/easier way to do what I'm trying to do?

3)      I suppose I could create a field that is made up of every element then use that field in the constraint?

Thanks,
David

From: general-bounces@...
[mailto:general-bounces@...] On Behalf Of Geert Josten
Sent: Friday, August 17, 2012 9:37 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Hi Amit,

>From what I read in the docs, the <term> option (which is one of two that allows <term-option>s,
<constraint> being the other) is not to apply term-options generally, but specifically for
unconstraint searches. So, if you search for something like:

               foo or xx:bar

Then the term-options within <term> are applied to 'foo'. The term-options within <constraint
name="xx"> are applied to 'bar'..

Kind regards,
Geert

Van:
general-bounces@...<mailto:general-bounces@...>
[mailto:general-bounces@...<mailto:general-bounces@...>]
Namens amit gope
Verzonden: vrijdag 17 augustus 2012 14:54
Aan: general@...<mailto:general@...>
Onderwerp: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Hi Geert,

My search options has almost 20 constraints and when i add the term option as unstemmed to be common for all
the constaints it doesn't work, but when i provide the term-option value unstemmed to individual
constraints then it works, why this is happening, is this a feature of search api to provide separate term option?

--
Regards
Amit
On 17 August 2012 00:30,
<general-request@...<mailto:general-request@...>> wrote:
Send General mailing list submissions to
        general@...<mailto:general@...>

To subscribe or unsubscribe via the World Wide Web, visit
        http://developer.marklogic.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
        general-request@...<mailto:general-request@...>

You can reach the person managing the list at
        general-owner@...<mailto:general-owner@...>

When replying, please edit your Subject line so it is more specific than "Re: Contents of General digest..."

Today's Topics:

   1. Natural language version of a query? (Tim Finney)
   2. Query on multiple language using search api (amit gope)
   3. Re: Natural language version of a query? (Geert Josten)
   4. Re: Query on multiple language using search       api (Geert Josten)
   5. Local-disk forest failover (Danny Sinang)
   6. Re: Local-disk forest failover (Michael Blakeley)
   7. Re: Local-disk forest failover (Wayne Feick)

---------- Forwarded message ----------
From: Tim Finney <tjf@...<mailto:tjf@...>>
To: general@...<mailto:general@...>
Cc:
Date: Wed, 15 Aug 2012 18:29:12 -0300
Subject: [MarkLogic Dev General] Natural language version of a query?
Hi All,

Has anyone here tried to produce a natural language equivalent of a search string or the kind used in
search:search? As an example, here is an imaginary search string:

cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
date-after:1984-03-01 date-before:1991-05-31

I'd like to end up with something like this:

cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
1984-03-01 AND before 1991-05-31

(Things are complicated by parentheses, NEAR, NOT, ...)

Are there any built-in functions for doing such a thing?

Best,

Tim Finney

---------- Forwarded message ----------
From: amit gope <amitgope2@...<mailto:amitgope2@...>>
To: general@...<mailto:general@...>
Cc:
Date: Thu, 16 Aug 2012 11:42:18 +0530
Subject: [MarkLogic Dev General] Query on multiple language using search api Hello All,

Can anyone please help me out queering on multiple languages using search api. In my database i have
documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language
specification it returns me contents from only english. How do i mention the language constraint to
include the search for languages de and fr as well?

Regards
Amit

---------- Forwarded message ----------
From: Geert Josten <geert.josten@...<mailto:geert.josten@...>>
To: MarkLogic Developer Discussion <general@...<mailto:general@...>>
Cc:
Date: Thu, 16 Aug 2012 10:22:13 +0200
Subject: Re: [MarkLogic Dev General] Natural language version of a query?
Hi Tim,

There is a grammar option in search:search options, but haven't looked into that myself yet. Perhaps the
documentation can make clear whether you can use that or not.

Alternative is to pre-process the search query yourself. You can try to tackle it with regex, but it might be
more fun to write a grammar for it and use the handy site maintained by Gunther Rademacher to generate
XQuery code out of it:

http://www.bottlecaps.de/rex/

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van:
general-bounces@...<mailto:general-bounces@...>
[mailto:general-bounces@...<mailto:general-bounces@...>]
Namens Tim Finney
Verzonden: woensdag 15 augustus 2012 23:29
Aan: general@...<mailto:general@...>
Onderwerp: [MarkLogic Dev General] Natural language version of a query?

Hi All,

Has anyone here tried to produce a natural language equivalent of a search string or the kind used in
search:search? As an example, here is an imaginary search string:

cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
date-after:1984-03-01 date-before:1991-05-31

I'd like to end up with something like this:

cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
1984-03-01 AND before 1991-05-31

(Things are complicated by parentheses, NEAR, NOT, ...)

Are there any built-in functions for doing such a thing?

Best,

Tim Finney

_______________________________________________
General mailing list
General@...<mailto:General@...>
http://developer.marklogic.com/mailman/listinfo/general

---------- Forwarded message ----------
From: Geert Josten <geert.josten@...<mailto:geert.josten@...>>
To: MarkLogic Developer Discussion <general@...<mailto:general@...>>
Cc:
Date: Thu, 16 Aug 2012 10:25:46 +0200
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api Hi Amit,

Haven't tried, but you should be able to add
<term-option>lang=en</term-option><term-option>lang=de</term-option><term-option>lang=fr</term-option>
to the relevant constraint..

Kind regards,
Geert

PS: I'm wondering whether it would also accept lang=en,de,fr, but the docs don't seem to indicate so..

Van:
general-bounces@...<mailto:general-bounces@...>
[mailto:general-bounces@...<mailto:general-bounces@...>]
Namens amit gope
Verzonden: donderdag 16 augustus 2012 8:12
Aan: general@...<mailto:general@...>
Onderwerp: [MarkLogic Dev General] Query on multiple language using search api

Hello All,

Can anyone please help me out queering on multiple languages using search api. In my database i have
documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language
specification it returns me contents from only english. How do i mention the language constraint to
include the search for languages de and fr as well?

Regards
Amit

---------- Forwarded message ----------
From: Danny Sinang <d.sinang@...<mailto:d.sinang@...>>
To: general <General@...<mailto:General@...>>
Cc:
Date: Thu, 16 Aug 2012 11:00:54 -0400
Subject: [MarkLogic Dev General] Local-disk forest failover Hi,

When a local-disk failover happens, will the replica forest (which just became the primary forest) need to
reindex ?

Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?

Regards,
Danny

---------- Forwarded message ----------
From: Michael Blakeley <mike@...<mailto:mike@...>>
To: MarkLogic Developer Discussion <general@...<mailto:general@...>>
Cc:
Date: Thu, 16 Aug 2012 10:23:30 -0700
Subject: Re: [MarkLogic Dev General] Local-disk forest failover No on both questions. Forest
replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately -
not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
>
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
>
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>
> Regards,
> Danny
>
>
> _______________________________________________
> General mailing list
> General@...<mailto:General@...
> > http://developer.marklogic.com/mailman/listinfo/general

---------- Forwarded message ----------
From: Wayne Feick <Wayne.Feick@...<mailto:Wayne.Feick@...>>
To: MarkLogic Developer Discussion <general@...<mailto:general@...>>
Cc:
Date: Thu, 16 Aug 2012 10:33:39 -0700
Subject: Re: [MarkLogic Dev General] Local-disk forest failover A slight refinement; replicas are
equivalent copies rather than exact copies. You'll have the same fragments, but likely organized
differently into stands.

Wayne

Michael Blakeley
<mike@...<mailto:mike@...>> wrote:

No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.

This underscores the importance of monitoring. You want to find out about a forest failure immediately -
not weeks later, when the replica fails and the whole database goes offline.

-- Mike

On 16 Aug 2012, at 08:00 , Danny Sinang wrote:

> Hi,
>
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
>
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>
> Regards,
> Danny
>
>
> _______________________________________________
> General mailing list
> General@...<mailto:General@...
> > http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General@...<mailto:General@...>
http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General@...<mailto:General@...>
http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General@...
http://developer.marklogic.com/mailman/listinfo/general
Michael Blakeley | 17 Oct 2012 19:58
Favicon

Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Here's what I tried, which seems to work using 6.0-1.1:

import module namespace search = "http://marklogic.com/appservices/search"
  at "/MarkLogic/appservices/search/search.xqy";

search:parse(
  'blue AND green AND stemmed:ran',
  <options xmlns="http://marklogic.com/appservices/search">
    <constraint name="stemmed">
      <word><term-option>stemmed</term-option></word></constraint></options>)
=>
<cts:and-query qtextjoin="AND" strength="20" qtextgroup="( )" xmlns:cts="http://marklogic.com/cts">
  <cts:word-query qtextref="cts:text">
    <cts:text>blue</cts:text>
  </cts:word-query>
  <cts:word-query qtextref="cts:text">
    <cts:text>green</cts:text>
  </cts:word-query>
  <cts:word-query qtextpre="stemmed:" qtextref="cts:annotation">
    <cts:annotation qtextref="following-sibling::cts:text"/>
    <cts:text>ran</cts:text>
    <cts:option>stemmed</cts:option>
  </cts:word-query>
</cts:and-query>

-- Mike

On 17 Oct 2012, at 09:08 , "Steiner, David J. (LNG-DAY)" <David.J.Steiner <at> elsevier.com> wrote:

> Here’s a similar situation:
> Using 4.1,
> I have an unstemmed database.  However the user searching it occasionally know she/he wants to search for
the stemmed version of one of their terms.
> The “term” option applies to all terms in a document and the constraint would only apply to specific
element(s) for value or word.
>  
> I want to do something like allow: blue AND green AND stemmed:ran
> That is, I want to search the entire document for unstemmed versions of “blue” and “green” and the
stemmed version of “ran.”
>  
> However, I’m not really seeing how to construct that constraint without simply listing all elements of
a document in the constraint.
>  
> <options xmlns="http://marklogic.com/appservices/search">
>   <constraint name="stemmed">
>   <word>
>       <term-option>stemmed</term-option>
>       <element name="my-element1"/>
>     </word>
>     <word>
>       <term-option>stemmed</term-option>
>       <element name="my-element2"/>
>     </word>
> …
>   </constraint>
>  
> Which actually appears to not be allowed – you can only get one element in word or only one word in a
constraint (even though check-options gives no error).  When I try this I get:
>   [1.0-ml] XDMP-ARGTYPE: (err:XPTY0004) fn:QName("", (xs:NCName("my-element1"),
xs:NCName("my-element2"))) -- arg2 is not of type xs:string
>  
>  
> So,
> 1)      Does this even work, perhaps in a later version of ML?
> 2)      Is there a better/easier way to do what I’m trying to do?
> 3)      I suppose I could create a field that is made up of every element then use that field in the constraint?
>  
>  
> Thanks,
> David
>  
>  
>  
> From: general-bounces@...
[mailto:general-bounces <at> developer.marklogic.com] On Behalf Of Geert Josten
> Sent: Friday, August 17, 2012 9:37 AM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)
>  
> Hi Amit,
>  
> From what I read in the docs, the <term> option (which is one of two that allows <term-option>s,
<constraint> being the other) is not to apply term-options generally, but specifically for
unconstraint searches. So, if you search for something like:
>  
>                foo or xx:bar
>  
> Then the term-options within <term> are applied to ‘foo’. The term-options within <constraint
name=”xx”> are applied to ‘bar’..
>  
> Kind regards,
> Geert
>  
> Van: general-bounces@...
[mailto:general-bounces <at> developer.marklogic.com] Namens amit gope
> Verzonden: vrijdag 17 augustus 2012 14:54
> Aan: general@...
> Onderwerp: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)
>  
> Hi Geert,
> 
> My search options has almost 20 constraints and when i add the term option as unstemmed to be common for all
the constaints it doesn't work, but when i provide the term-option value unstemmed to individual
constraints then it works, why this is happening, is this a feature of search api to provide separate term option?
> 
> 
> -- 
> Regards
> Amit
> 
> On 17 August 2012 00:30, <general-request@...> wrote:
> Send General mailing list submissions to
>         general@...
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://developer.marklogic.com/mailman/listinfo/general
> or, via email, send a message with subject or body 'help' to
>         general-request@...
> 
> You can reach the person managing the list at
>         general-owner@...
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of General digest..."
> 
> Today's Topics:
> 
>    1. Natural language version of a query? (Tim Finney)
>    2. Query on multiple language using search api (amit gope)
>    3. Re: Natural language version of a query? (Geert Josten)
>    4. Re: Query on multiple language using search       api (Geert Josten)
>    5. Local-disk forest failover (Danny Sinang)
>    6. Re: Local-disk forest failover (Michael Blakeley)
>    7. Re: Local-disk forest failover (Wayne Feick)
> 
> 
> ---------- Forwarded message ----------
> From: Tim Finney <tjf@...>
> To: general@...
> Cc: 
> Date: Wed, 15 Aug 2012 18:29:12 -0300
> Subject: [MarkLogic Dev General] Natural language version of a query?
> Hi All,
> 
> Has anyone here tried to produce a natural language equivalent of a
> search string or the kind used in search:search? As an example, here is
> an imaginary search string:
> 
> cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
> date-after:1984-03-01 date-before:1991-05-31
> 
> I'd like to end up with something like this:
> 
> cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
> 1984-03-01 AND before 1991-05-31
> 
> (Things are complicated by parentheses, NEAR, NOT, ...)
> 
> Are there any built-in functions for doing such a thing?
> 
> Best,
> 
> Tim Finney
> 
> 
> 
> 
> 
> 
> ---------- Forwarded message ----------
> From: amit gope <amitgope2@...>
> To: general@...
> Cc: 
> Date: Thu, 16 Aug 2012 11:42:18 +0530
> Subject: [MarkLogic Dev General] Query on multiple language using search api
> Hello All,
> 
> Can anyone please help me out queering on multiple languages using search api. In my database i have
documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language
specification it returns me contents from only english. How do i mention the language constraint to
include the search for languages de and fr as well?
> 
> 
> Regards
> Amit 
> 
> 
> 
> 
> ---------- Forwarded message ----------
> From: Geert Josten <geert.josten@...>
> To: MarkLogic Developer Discussion <general@...>
> Cc: 
> Date: Thu, 16 Aug 2012 10:22:13 +0200
> Subject: Re: [MarkLogic Dev General] Natural language version of a query?
> Hi Tim,
> 
> There is a grammar option in search:search options, but haven't looked
> into that myself yet. Perhaps the documentation can make clear whether you
> can use that or not.
> 
> Alternative is to pre-process the search query yourself. You can try to
> tackle it with regex, but it might be more fun to write a grammar for it
> and use the handy site maintained by Gunther Rademacher to generate XQuery
> code out of it:
> 
> http://www.bottlecaps.de/rex/
> 
> Kind regards,
> Geert
> 
> -----Oorspronkelijk bericht-----
> Van: general-bounces@...
> [mailto:general-bounces@...] Namens Tim Finney
> Verzonden: woensdag 15 augustus 2012 23:29
> Aan: general@...
> Onderwerp: [MarkLogic Dev General] Natural language version of a query?
> 
> Hi All,
> 
> Has anyone here tried to produce a natural language equivalent of a search
> string or the kind used in search:search? As an example, here is an
> imaginary search string:
> 
> cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
> date-after:1984-03-01 date-before:1991-05-31
> 
> I'd like to end up with something like this:
> 
> cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
> 1984-03-01 AND before 1991-05-31
> 
> (Things are complicated by parentheses, NEAR, NOT, ...)
> 
> Are there any built-in functions for doing such a thing?
> 
> Best,
> 
> Tim Finney
> 
> 
> 
> _______________________________________________
> General mailing list
> General@...
> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> 
> ---------- Forwarded message ----------
> From: Geert Josten <geert.josten@...>
> To: MarkLogic Developer Discussion <general@...>
> Cc: 
> Date: Thu, 16 Aug 2012 10:25:46 +0200
> Subject: Re: [MarkLogic Dev General] Query on multiple language using search api
> Hi Amit,
>  
> Haven’t tried, but you should be able to add
<term-option>lang=en</term-option><term-option>lang=de</term-option><term-option>lang=fr</term-option>
to the relevant constraint..
>  
> Kind regards,
> Geert
>  
> PS: I’m wondering whether it would also accept lang=en,de,fr, but the docs don’t seem to indicate so..
>  
> Van: general-bounces@...
[mailto:general-bounces <at> developer.marklogic.com] Namens amit gope
> Verzonden: donderdag 16 augustus 2012 8:12
> Aan: general@...
> Onderwerp: [MarkLogic Dev General] Query on multiple language using search api
>  
> Hello All,
> 
> Can anyone please help me out queering on multiple languages using search api. In my database i have
documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language
specification it returns me contents from only english. How do i mention the language constraint to
include the search for languages de and fr as well?
> 
> 
> Regards
> Amit
> 
> 
> 
> ---------- Forwarded message ----------
> From: Danny Sinang <d.sinang@...>
> To: general <General@...>
> Cc: 
> Date: Thu, 16 Aug 2012 11:00:54 -0400
> Subject: [MarkLogic Dev General] Local-disk forest failover
> Hi,
>  
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
>  
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>  
> Regards,
> Danny
>  
>  
> 
> 
> ---------- Forwarded message ----------
> From: Michael Blakeley <mike@...>
> To: MarkLogic Developer Discussion <general@...>
> Cc: 
> Date: Thu, 16 Aug 2012 10:23:30 -0700
> Subject: Re: [MarkLogic Dev General] Local-disk forest failover
> No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.
> 
> This underscores the importance of monitoring. You want to find out about a forest failure immediately -
not weeks later, when the replica fails and the whole database goes offline.
> 
> -- Mike
> 
> On 16 Aug 2012, at 08:00 , Danny Sinang wrote:
> 
> > Hi,
> >
> > When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
> >
> > Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
> >
> > Regards,
> > Danny
> >
> >
> > _______________________________________________
> > General mailing list
> > General@...
> > http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> 
> 
> ---------- Forwarded message ----------
> From: Wayne Feick <Wayne.Feick@...>
> To: MarkLogic Developer Discussion <general@...>
> Cc: 
> Date: Thu, 16 Aug 2012 10:33:39 -0700
> Subject: Re: [MarkLogic Dev General] Local-disk forest failover
> A slight refinement; replicas are equivalent copies rather than exact copies. You'll have the same
fragments, but likely organized differently into stands.
> 
> Wayne
> 
> 
> Michael Blakeley <mike@...> wrote:
> 
> 
> No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.
> 
> This underscores the importance of monitoring. You want to find out about a forest failure immediately -
not weeks later, when the replica fails and the whole database goes offline.
> 
> -- Mike
> 
> On 16 Aug 2012, at 08:00 , Danny Sinang wrote:
> 
> > Hi,
> >
> > When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
> >
> > Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
> >
> > Regards,
> > Danny
> >
> >
> > _______________________________________________
> > General mailing list
> > General@...
> > http://developer.marklogic.com/mailman/listinfo/general
> 
> _______________________________________________
> General mailing list
> General@...
> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> _______________________________________________
> General mailing list
> General@...
> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> 
> 
> _______________________________________________
> General mailing list
> General@...
> http://developer.marklogic.com/mailman/listinfo/general

Steiner, David J. (LNG-DAY | 17 Oct 2012 20:11
Picon

Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Hi Mike,

I don't think that works in 4.1.

For:
xquery version "1.0-ml";
import module namespace search = "http://marklogic.com/appservices/search"
    at "/MarkLogic/appservices/search/search.xqy";

search:parse('stemmed:creditor AND blue',
<options xmlns="http://marklogic.com/appservices/search">
    <constraint name="stemmed">
      <word>
        <term-option>stemmed</term-option>
      </word>
    </constraint>
</options>)

==>

<cts:and-query qtextjoin="AND" strength="20" xmlns:cts="http://marklogic.com/cts">
  <cts:word-query qtextref="cts:text">
    <cts:text>blue</cts:text>
  </cts:word-query>
</cts:and-query>

I guess that this type of constraint syntax is not "understood" in 4.1?

David

-----Original Message-----
From: general-bounces@...
[mailto:general-bounces@...] On Behalf Of
Michael Blakeley
Sent: Wednesday, October 17, 2012 1:59 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Query on multiple language using search api (Geert Josten)

Here's what I tried, which seems to work using 6.0-1.1:

import module namespace search = "http://marklogic.com/appservices/search"
  at "/MarkLogic/appservices/search/search.xqy";

search:parse(
  'blue AND green AND stemmed:ran',
  <options xmlns="http://marklogic.com/appservices/search">
    <constraint name="stemmed">
      <word><term-option>stemmed</term-option></word></constraint></options>)
=>
<cts:and-query qtextjoin="AND" strength="20" qtextgroup="( )" xmlns:cts="http://marklogic.com/cts">
  <cts:word-query qtextref="cts:text">
    <cts:text>blue</cts:text>
  </cts:word-query>
  <cts:word-query qtextref="cts:text">
    <cts:text>green</cts:text>
  </cts:word-query>
  <cts:word-query qtextpre="stemmed:" qtextref="cts:annotation">
    <cts:annotation qtextref="following-sibling::cts:text"/>
    <cts:text>ran</cts:text>
    <cts:option>stemmed</cts:option>
  </cts:word-query>
</cts:and-query>

-- Mike

On 17 Oct 2012, at 09:08 , "Steiner, David J. (LNG-DAY)"
<David.J.Steiner@...> wrote:

> Here's a similar situation:
> Using 4.1,
> I have an unstemmed database.  However the user searching it occasionally know she/he wants to search for
the stemmed version of one of their terms.
> The "term" option applies to all terms in a document and the constraint would only apply to specific
element(s) for value or word.
>  
> I want to do something like allow: blue AND green AND stemmed:ran That 
> is, I want to search the entire document for unstemmed versions of "blue" and "green" and the stemmed
version of "ran."
>  
> However, I'm not really seeing how to construct that constraint without simply listing all elements of a
document in the constraint.
>  
> <options xmlns="http://marklogic.com/appservices/search">
>   <constraint name="stemmed">
>   <word>
>       <term-option>stemmed</term-option>
>       <element name="my-element1"/>
>     </word>
>     <word>
>       <term-option>stemmed</term-option>
>       <element name="my-element2"/>
>     </word>
> ...
>   </constraint>
>  
> Which actually appears to not be allowed - you can only get one element in word or only one word in a
constraint (even though check-options gives no error).  When I try this I get:
>   [1.0-ml] XDMP-ARGTYPE: (err:XPTY0004) fn:QName("", 
> (xs:NCName("my-element1"), xs:NCName("my-element2"))) -- arg2 is not 
> of type xs:string
>  
>  
> So,
> 1)      Does this even work, perhaps in a later version of ML?
> 2)      Is there a better/easier way to do what I'm trying to do?
> 3)      I suppose I could create a field that is made up of every element then use that field in the constraint?
>  
>  
> Thanks,
> David
>  
>  
>  
> From: general-bounces@... 
> [mailto:general-bounces@...] On Behalf Of Geert 
> Josten
> Sent: Friday, August 17, 2012 9:37 AM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Query on multiple language using 
> search api (Geert Josten)
>  
> Hi Amit,
>  
> From what I read in the docs, the <term> option (which is one of two that allows <term-option>s,
<constraint> being the other) is not to apply term-options generally, but specifically for
unconstraint searches. So, if you search for something like:
>  
>                foo or xx:bar
>  
> Then the term-options within <term> are applied to 'foo'. The term-options within <constraint
name="xx"> are applied to 'bar'..
>  
> Kind regards,
> Geert
>  
> Van: general-bounces@... 
> [mailto:general-bounces@...] Namens amit gope
> Verzonden: vrijdag 17 augustus 2012 14:54
> Aan: general@...
> Onderwerp: Re: [MarkLogic Dev General] Query on multiple language 
> using search api (Geert Josten)
>  
> Hi Geert,
> 
> My search options has almost 20 constraints and when i add the term option as unstemmed to be common for all
the constaints it doesn't work, but when i provide the term-option value unstemmed to individual
constraints then it works, why this is happening, is this a feature of search api to provide separate term option?
> 
> 
> --
> Regards
> Amit
> 
> On 17 August 2012 00:30, <general-request@...> wrote:
> Send General mailing list submissions to
>         general@...
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://developer.marklogic.com/mailman/listinfo/general
> or, via email, send a message with subject or body 'help' to
>         general-request@...
> 
> You can reach the person managing the list at
>         general-owner@...
> 
> When replying, please edit your Subject line so it is more specific 
> than "Re: Contents of General digest..."
> 
> Today's Topics:
> 
>    1. Natural language version of a query? (Tim Finney)
>    2. Query on multiple language using search api (amit gope)
>    3. Re: Natural language version of a query? (Geert Josten)
>    4. Re: Query on multiple language using search       api (Geert Josten)
>    5. Local-disk forest failover (Danny Sinang)
>    6. Re: Local-disk forest failover (Michael Blakeley)
>    7. Re: Local-disk forest failover (Wayne Feick)
> 
> 
> ---------- Forwarded message ----------
> From: Tim Finney <tjf@...>
> To: general@...
> Cc: 
> Date: Wed, 15 Aug 2012 18:29:12 -0300
> Subject: [MarkLogic Dev General] Natural language version of a query?
> Hi All,
> 
> Has anyone here tried to produce a natural language equivalent of a 
> search string or the kind used in search:search? As an example, here 
> is an imaginary search string:
> 
> cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
> date-after:1984-03-01 date-before:1991-05-31
> 
> I'd like to end up with something like this:
> 
> cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
> 1984-03-01 AND before 1991-05-31
> 
> (Things are complicated by parentheses, NEAR, NOT, ...)
> 
> Are there any built-in functions for doing such a thing?
> 
> Best,
> 
> Tim Finney
> 
> 
> 
> 
> 
> 
> ---------- Forwarded message ----------
> From: amit gope <amitgope2@...>
> To: general@...
> Cc: 
> Date: Thu, 16 Aug 2012 11:42:18 +0530
> Subject: [MarkLogic Dev General] Query on multiple language using 
> search api Hello All,
> 
> Can anyone please help me out queering on multiple languages using search api. In my database i have
documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language
specification it returns me contents from only english. How do i mention the language constraint to
include the search for languages de and fr as well?
> 
> 
> Regards
> Amit
> 
> 
> 
> 
> ---------- Forwarded message ----------
> From: Geert Josten <geert.josten@...>
> To: MarkLogic Developer Discussion <general@...>
> Cc: 
> Date: Thu, 16 Aug 2012 10:22:13 +0200
> Subject: Re: [MarkLogic Dev General] Natural language version of a query?
> Hi Tim,
> 
> There is a grammar option in search:search options, but haven't looked 
> into that myself yet. Perhaps the documentation can make clear whether 
> you can use that or not.
> 
> Alternative is to pre-process the search query yourself. You can try 
> to tackle it with regex, but it might be more fun to write a grammar 
> for it and use the handy site maintained by Gunther Rademacher to 
> generate XQuery code out of it:
> 
> http://www.bottlecaps.de/rex/
> 
> Kind regards,
> Geert
> 
> -----Oorspronkelijk bericht-----
> Van: general-bounces@...
> [mailto:general-bounces@...] Namens Tim Finney
> Verzonden: woensdag 15 augustus 2012 23:29
> Aan: general@...
> Onderwerp: [MarkLogic Dev General] Natural language version of a query?
> 
> Hi All,
> 
> Has anyone here tried to produce a natural language equivalent of a 
> search string or the kind used in search:search? As an example, here 
> is an imaginary search string:
> 
> cat OR dog (author:"Smith, John" OR author:"Jones, Thomas")
> date-after:1984-03-01 date-before:1991-05-31
> 
> I'd like to end up with something like this:
> 
> cat OR dog with authors "Smith, John" OR "Jones, Thomas" AND after
> 1984-03-01 AND before 1991-05-31
> 
> (Things are complicated by parentheses, NEAR, NOT, ...)
> 
> Are there any built-in functions for doing such a thing?
> 
> Best,
> 
> Tim Finney
> 
> 
> 
> _______________________________________________
> General mailing list
> General@...
> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> 
> ---------- Forwarded message ----------
> From: Geert Josten <geert.josten@...>
> To: MarkLogic Developer Discussion <general@...>
> Cc: 
> Date: Thu, 16 Aug 2012 10:25:46 +0200
> Subject: Re: [MarkLogic Dev General] Query on multiple language using 
> search api Hi Amit,
>  
> Haven't tried, but you should be able to add
<term-option>lang=en</term-option><term-option>lang=de</term-option><term-option>lang=fr</term-option>
to the relevant constraint..
>  
> Kind regards,
> Geert
>  
> PS: I'm wondering whether it would also accept lang=en,de,fr, but the docs don't seem to indicate so..
>  
> Van: general-bounces@... 
> [mailto:general-bounces@...] Namens amit gope
> Verzonden: donderdag 16 augustus 2012 8:12
> Aan: general@...
> Onderwerp: [MarkLogic Dev General] Query on multiple language using 
> search api
>  
> Hello All,
> 
> Can anyone please help me out queering on multiple languages using search api. In my database i have
documents of different languages (en, de, fr) to name a few. Currently when i do not provide any language
specification it returns me contents from only english. How do i mention the language constraint to
include the search for languages de and fr as well?
> 
> 
> Regards
> Amit
> 
> 
> 
> ---------- Forwarded message ----------
> From: Danny Sinang <d.sinang@...>
> To: general <General@...>
> Cc: 
> Date: Thu, 16 Aug 2012 11:00:54 -0400
> Subject: [MarkLogic Dev General] Local-disk forest failover Hi,
>  
> When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
>  
> Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
>  
> Regards,
> Danny
>  
>  
> 
> 
> ---------- Forwarded message ----------
> From: Michael Blakeley <mike@...>
> To: MarkLogic Developer Discussion <general@...>
> Cc: 
> Date: Thu, 16 Aug 2012 10:23:30 -0700
> Subject: Re: [MarkLogic Dev General] Local-disk forest failover No on 
> both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.
> 
> This underscores the importance of monitoring. You want to find out about a forest failure immediately -
not weeks later, when the replica fails and the whole database goes offline.
> 
> -- Mike
> 
> On 16 Aug 2012, at 08:00 , Danny Sinang wrote:
> 
> > Hi,
> >
> > When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
> >
> > Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
> >
> > Regards,
> > Danny
> >
> >
> > _______________________________________________
> > General mailing list
> > General@...
> > http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> 
> 
> ---------- Forwarded message ----------
> From: Wayne Feick <Wayne.Feick@...>
> To: MarkLogic Developer Discussion <general@...>
> Cc: 
> Date: Thu, 16 Aug 2012 10:33:39 -0700
> Subject: Re: [MarkLogic Dev General] Local-disk forest failover A 
> slight refinement; replicas are equivalent copies rather than exact copies. You'll have the same
fragments, but likely organized differently into stands.
> 
> Wayne
> 
> 
> Michael Blakeley <mike@...> wrote:
> 
> 
> No on both questions. Forest replication is just like RAID-1. You set up the mirrors, and they are exact copies.
> 
> This underscores the importance of monitoring. You want to find out about a forest failure immediately -
not weeks later, when the replica fails and the whole database goes offline.
> 
> -- Mike
> 
> On 16 Aug 2012, at 08:00 , Danny Sinang wrote:
> 
> > Hi,
> >
> > When a local-disk failover happens, will the replica forest (which just became the primary forest) need
to reindex ?
> >
> > Also, will the surviving cluster node try to replicate the new forest to some other cluster members  ?
> >
> > Regards,
> > Danny
> >
> >
> > _______________________________________________
> > General mailing list
> > General@...
> > http://developer.marklogic.com/mailman/listinfo/general
> 
> _______________________________________________
> General mailing list
> General@...
> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> _______________________________________________
> General mailing list
> General@...
> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> 
> 
> _______________________________________________
> General mailing list
> General@...
> http://developer.marklogic.com/mailman/listinfo/general

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

Gmane