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

amit gope amitgope2 at gmail.com
Fri Aug 17 05:53:35 PDT 2012


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 at developer.marklogic.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 at developer.marklogic.com
>
> You can reach the person managing the list at
>         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 at tfinney.net>
> 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 at dayon.nl>
> To: MarkLogic Developer Discussion <general at developer.marklogic.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 at developer.marklogic.com
> [mailto:general-bounces at developer.marklogic.com] 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 at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
>
>
> ---------- Forwarded message ----------
> From: Geert Josten <geert.josten at dayon.nl>
> To: MarkLogic Developer Discussion <general at developer.marklogic.com>
> 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 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 at gmail.com>
> 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 at blakeley.com>
> To: MarkLogic Developer Discussion <general at developer.marklogic.com>
> 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 at marklogic.com>
> To: MarkLogic Developer Discussion <general at developer.marklogic.com>
> 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 at blakeley.com> 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 at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120817/2c24a19f/attachment-0001.html 


More information about the General mailing list