[MarkLogic Dev General] Querying across 2 or more MarkLogic databases

Betty Harvey harvey at eccnet.com
Sun Mar 11 14:51:07 PDT 2012


Thanks Mike and Geert:

Unfortunately the previous contractor architecture had multiple databases
and these are in production and can't be modified without major overhaul
the system.

Currently we have another MarkLogic instance where we have combined all
the databases into a single repository for querying and reporting
purposes. This isn't a long term solution because there is a lot of manual
extraction and copying going on.

In the next few months hopefully we can replicate the database production
database.

Another question about replication -- is it possible to replicate the
multiple databases into a single repository.  In the temporary reporting
environment we have set up we have all 3 databases in a single repository
in separate directories.

If the replication into a single repository is possible that is a better
solution.  We won't have to modify any of the standard reports that have
been developed.

As always -- thanks for the advice!

Betty

> 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.
>
> -- Mike
>
> 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,
>> Geert
>>
>>> -----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
>> MarkLogic
>>> databases
>>>
>>> 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
>> query
>>>> across multiple databases to get a single view of data.
>>>>
>>>> I haven't been able to find if this is possible.
>>>>
>>>> TIA!
>>>>
>>>> Betty
>>>>
>>>>
>>>> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
>>>> 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
>>>> 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
>>
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>


/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
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)


More information about the General mailing list