[MarkLogic Dev General] Querying across 2 or more MarkLogic databases
mike at blakeley.com
Sun Mar 11 13:35:42 PDT 2012
I agree with Geert. While cross-database queries are possible, it's often better to use collections or directories rather than separate databases. For example, text search results are generally ranked by score. Scores are calculated per-database. So merging text search results between multiple databases may produce odd rankings.
On 11 Mar 2012, at 20:15 , Geert Josten wrote:
> Hi Betty,
> Yes, you can use xdmp:invoke, or xdmp:eval for that purpose, but you'll
> have to combine results yourself in memory, so that comes with a penalty.
> Might be worth considering replication/syncing between databases..
> Kind regards,
>> -----Oorspronkelijk bericht-----
>> Van: general-bounces at developer.marklogic.com [mailto:general-
>> bounces at developer.marklogic.com] Namens Danny Sinang
>> Verzonden: zondag 11 maart 2012 20:55
>> Aan: MarkLogic Developer Discussion
>> Onderwerp: Re: [MarkLogic Dev General] Querying across 2 or more
>> I think you can do so using xdmp:invoke with an Options clause
>> specifying a different database. Assign the results of that query to a
>> variable and use it in other queries on other db's.
>> Sent from my iPhone
>> On Mar 11, 2012, at 3:21 PM, "Betty Harvey" <harvey at eccnet.com> wrote:
>>> Is it possible to query across databases in MarkLogic? I need to
>>> across multiple databases to get a single view of data.
>>> I haven't been able to find if this is possible.
>>> Betty Harvey | Phone: 410-787-9200 FAX: 9830
>>> Electronic Commerce Connection, Inc. |
>>> harvey at eccnet.com | Washington,DC XML Users Grp
>>> URL: http://www.eccnet.com | http://www.eccnet.com/xmlug
>>> Member of XML Guild (www.xmlguild.org)
>>> General mailing list
>>> General at developer.marklogic.com
>> General mailing list
>> General at developer.marklogic.com
> General mailing list
> General at developer.marklogic.com
More information about the General