[MarkLogic Dev General] How to update MARKLOGIC_ZONE parameter so Slave can become healthy in 3 node cluster?

2017-03-03 Thread Gulik, Ernest
Hello everyone,
I'm testing DR case for 3 node cluster in AWS where I emulate AZ failure.

I posted question on 
stackoverflow
 with all details on my issue to minimize this email.

I hope someone can help as this is critical issue where Slaves in Cluster don't 
come back to live.

Any advice really appreciated.


Thank you,
Ernest Gulik

___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Data Modelling for "option lists" (Anne Taylor)

2017-03-03 Thread Gary Vidal
Anne,

There are a few approaches to lists that you can consider.  Often static
lists serve 2 use cases.  The values that are possible vs the values that
exists.
In cases where the values are possible, using static lists can be as simple
as storing each list as separate documents. Then having services that
enumerate between the static list vs the data that has the values. One
caveat to this problem is lists that have alot of updates and reads.
Because the list is a single document, you have lock contention which can
be a performance bottleneck as updates will block reads until the update is
committed. So it is important to consider that these lists are generally
not updated.  If the list has a bit of volatility you may consider to put
individual elements inside the list as one document per instanceand perhaps
wrap in a collection by the entity name, to reduce the lock contention.
But this leads to multiple document updates to refresh so the consideration
is that the list should be a small number to fit into a transaction space.
This will mostly be a factor in the cardinality of the data for get/update
patterns.  Every time the list is read, it will require multiple reads of
documents also.

Another approach is to use the lists only to serve as a means to enumerate
possible values for update to documents and use Range Indexes on documents
to return values during query such as faceted navigation.  This ensures the
values used are presented to search clients vs a list of values that return
no results.

Another nuance on this approach is to used semantic lists such as skos or
controlled vocabularies to define the lists and then also assign documents
to those subject IRIs to link documents to vocabularies.  This approach
allows joining data together, but also allows lists to be enhanced outside
of the documents for a richer search or retrieval experience.  Consider a
static list of states or countries.  In a static list you may want to build
a regional context to each country or link states/cities to their country.
Using a flat list approach and statically assigning documents to those
values, you lose the queryability for those broader definitions.  By using
the triple approach, the values associated at the lowest leafs such as
city->state->country can resolve to regions without changing the data to
reflect those constructs.

Consider the use case as follows:
Define the static list as triples using skos

URI : /lists/countries.xml (collection:country)

  
  
  urn:countries:US
  rdf:type
  urn:countries
  
  
  urn:countries:US
  skos:prefLabel
  United States of America
  
  
  urn:countries:US
  skos:altLabel
  USA
  United States
  Estados Unidos@sp-sp
  
  
   ...


URI: /documents/1.xml

  
   US
  
 
   
   urn:documents:1
   property:inCountry
   urn:countries:US
   
 


The following doc allows for value based search and adding a semantic
triple allows the relationship to interact with your country ontology

No lets consider the case of our region
URI /ontologies/regions-NorthAmerica.xml



  
  urn:regions:NA
  rdf:type
  urn:regions
  
  
  urn:regions:NA
  skos:prefLabel
  North America
  
  
  urn:regions:NA
  skos:prefLabel
  America Northern
  
  
  urn:regions:NA
  skos:narrower
  urn:countries:US
  
  
  urn:regions:NA
  skos:narrower
  urn:countries:CA
  
  
  urn:regions:NA
  skos:narrower
  urn:countries:MX
  


As you can see from examples above we have different ways of assigning and
attaching meanings that can support multi-modal concerns in our content. So
lets take the example through the query phase and see how multi-modal
queries can be used.

Query Documents where Country  = "US"
cts:search(/document,cts:element-value-query(xs:QName("country"),"US"))

But what if the user queries Country  = "United States of America"?

let $values :=
  sem:sparql("
PREFIX skos: 
   SELECT ?country
   WHERE  {
  ?country is-a 
  ?country (skos:prefLabel) ?prefLabel .
  ?s skos:altLabel ?altLabel
FILTER(?prefLabel = $countryQuery || ?altLabel = $countryQuery )
   }
 ", map:entry("countryQuery","United States of America"))
 ! map:get(.,map:keys("country"))
return

 cts:search(/document,cts:triple-range-query((),(),cts:triple-subject($values))

No lets consider regions as described above.  The countries themselves are
not aware of which region  they are assigned and the documents are only
tagged at the country level (this could even be the state or the
city/municipality)

Query: region:"North America"

let $locations :=
sem:sparql("
PREFIX skos: 
   SELECT ?locations
   WHERE  {
  ?region is-a "urn:regions" .
  ?region (skos:altLabel|skos:prefLabel) ?value FILTER(?value =
$regionQuery)
  ?region skos:narrower* ?locations
   }
 ", map:entry("regionQuery","North America"))
 ! map:g

Re: [MarkLogic Dev General] Data Modelling for "option lists"

2017-03-03 Thread Ron Hitchens

Hi Anne,

   The usual way to do this is with a range index.  Range indexes contain the 
unique values, conveniently sorted, that occur for a given element (or 
element/attribute) throughout the database.  They are very fast and are 
dynamically updated as content changes so they always reflect the actual set of 
values.  Range indexes are especially useful when the unique set of values is 
small (like a category, name of a country, etc).  This makes them very useful 
for populating drop down menus and the like.

   There are two typical use cases for this scenario, and the code is basically 
the same for both:

 1) List all the unique values that exist in the corpus, such as a rating (like 
1-10), country code, publication year, language, etc.  This is useful for 
generating search facets by offering each of the unique values found in a 
search as a further drill-down constraint.

2) Offering a list of choices, some of which may not exist in the content yet.  
This would be useful for a registration form, for example, to populate a list 
of choices (such as the dreaded “where did you hear about us?” question).  As 
you describe, these could be placed in a reference data document that is 
updated as needed.

   Both would be implemented by configuring a range index on the relevant 
element, and then just using cts:element-values() to fetch the sorted values.  
For reference data list documents, you might put them in a named collection and 
use cts:collection-query() to constrain the values if the same element name 
might also appear elsewhere.

   As far as single vs multiple documents, with a range index it doesn’t really 
matter, since using the index to get a list of values works the same regardless 
of where the values came from (fetching range index values does not touch the 
original document).  So you could place all these ref data values in one big 
document, one document per topic, or many individual documents.

   For this use case there is no performance impact and you should choose the 
structure that’s easiest and the least error prone.  There can be 
considerations when you’re using range indexes to optimize searches for 
specific documents.  In that case you generally want only one indexed value per 
document (like a type or category code) because it make composing multiple 
queries easier.  But if you’re just after the values, it doesn’t matter.

   Hope that helps.

---
Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212

> On Mar 3, 2017, at 12:35 PM, Anne Taylor  wrote:
> 
> Hi all,
>  
> My colleagues and I are looking for a recommendation of how best to store 
> what can be considered semi-static lists in MarkLogic.  These are the kind of 
> lists that would be used to populate the dropdown lists on the front end web 
> site.  For example, a list of countries, languages, and also in our case a 
> fixed list of crops, all of which can be used to associate as tags for a 
> document when it is uploaded.  Is there a standard, accepted way to do this 
> in MarkLogic or generally in XML data modelling?  When a user uploads a new 
> document any associated tags will then be stored in that document. 
>  
> The options we’ve considered are:
>  
> 1.  We have one document which contains lists of the type:
> 
> Afghanistan
> Aland Islands
> Albania
> 
>  
> 
> Arabic
> Bambara
> Bariba
> 
>  
> 
> Apple
> Banana
> Cocoa
>  
> 2. Similar to above, but each type is stored in its own document
>  
> 3.  Each individual item is stored in its own document, and a collection is 
> added to help with filtering the relevant document, so we have a collection 
> “CountryList” and a collection “LanguageList” or similar.  This seems to fit 
> best with the recommendation of “one document is one record” when we try to 
> convert our relational database thinking into document style, but makes lots 
> of very small document fragments.  This also gives each value a related URI.
>  
> The lists may be updated occasionally, but not on a frequent basis.
>  
> We’d find it very useful to hear anyone else’s experience and recommendations.
>  
> Many thanks,
> Anne
>  
> P Think Green - don't print this email unless you really need to 
> 
> The information contained in this e-mail and any files transmitted with it is 
> confidential and is for the exclusive use of the intended recipient. If you 
> are not the intended recipient please note that any distribution, copying or 
> use of this communication or the information in it is prohibited. 
> 
> Whilst CAB International trading as CABI takes steps to prevent the 
> transmission of viruses via e-mail, we cannot guarantee that any e-mail or 
> attachment is free from computer viruses and you are strongly advised to 
> undertake your own anti-virus precautions.
> 
> If you have received this communication in error, please notify us by e-mail 
> at c...

Re: [MarkLogic Dev General] General Digest, Vol 153, Issue 4

2017-03-03 Thread Erik Zander
Hi Yogesh

Just to rule this out, do you use different types of authentication on your 
remote server and your local machine.

Namely do you use basic on your local machine and higher on the server. If so 
have you changed the windows (assuming you run it on windows) registry to allow 
basic authentications?

Regards
Erik

Från: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] För Yogesh Kumar
Skickat: den 3 mars 2017 09:43
Till: general@developer.marklogic.com
Ämne: Re: [MarkLogic Dev General] General Digest, Vol 153, Issue 4

Hi Geert,

As I wrote in my previous mail I have MarkLogic installed in my desktop 
computer. In that I have created a WebDAV server with 8777 port number.
It is created successfully and attached to my module database.
To access files in my module database by file explorer, I am trying to add 
network location in my desktop with my WebDAV details which is giving me the 
error message "The folder you entered does not appear to be valid. Please 
choose another."

Note: I can able to add network location of WebDAV server which is created in 
remotely installed MarkLogic. I am facing this issue with MarkLogic server 
installed in my machine.


Thanks,
Yogesh

On 03-Mar-2017 1:30 AM, 
mailto:general-requ...@developer.marklogic.com>>
 wrote:
Send General mailing list submissions to
general@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-requ...@developer.marklogic.com

You can reach the person managing the list at

general-ow...@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. Unable to add network location of web dev server (Yogesh Kumar)
   2. Re: Unable to add network location of web dev server
  (Geert Josten)


--

Message: 1
Date: Thu, 2 Mar 2017 14:21:31 +0530
From: Yogesh Kumar mailto:yogiman...@gmail.com>>
Subject: [MarkLogic Dev General] Unable to add network location of web
dev server
To: general@developer.marklogic.com
Message-ID:

mailto:cakazjdyxkag72nvj9z38qnjazncy%2bug18mjtotbkbcfhygs...@mail.gmail.com>>
Content-Type: text/plain; charset="utf-8"

Hi Team,

I have ML instance in my local machine. I am trying to add a network
location for a web dev which I have created in same MarkLogic server.

While doing I am getting the following error.
"The folder you entered does not appear to be valid. Please choose another".

I have entered the path as
"http://localhost:8777";.


Thanks,
Yogesh
-- next part --
An HTML attachment was scrubbed...
URL: 
http://developer.marklogic.com/pipermail/general/attachments/20170302/bd53d465/attachment-0001.html

--

Message: 2
Date: Thu, 2 Mar 2017 09:25:02 +
From: Geert Josten 
mailto:geert.jos...@marklogic.com>>
Subject: Re: [MarkLogic Dev General] Unable to add network location of
web dev server
To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Message-ID: 
mailto:d4dda36f.f5b86%25geert.jos...@marklogic.com>>
Content-Type: text/plain; charset="us-ascii"

Hi Yogesh,

Can you provide more detail?

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>>
 on behalf of Yogesh Kumar 
mailto:yogiman...@gmail.com>>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>>
Date: Thursday, March 2, 2017 at 9:51 AM
To: 
"general@developer.marklogic.com>"
 
mailto:general@developer.marklogic.com>>>
Subject: [MarkLogic Dev General] Unable to add network location of web dev 
server

Hi Team,

I have ML instance in my local machine. I am trying to add a network location 
for a web dev which I have created in same MarkLogic server.

While doing I am getting the following error.
"The folder you entered does not appear to be valid. Please choose another".

I have entered the path as
"http://localhost:8777";.


Thanks,
Yogesh
-- next part --
An HTML attachment was scrubbed...
URL: 
http://developer.marklogic.com/pipermail/general/attachments/20170302/0aa982e5/attachment-0001.html

---

[MarkLogic Dev General] Data Modelling for "option lists"

2017-03-03 Thread Anne Taylor
Hi all,

My colleagues and I are looking for a recommendation of how best to store what 
can be considered semi-static lists in MarkLogic.  These are the kind of lists 
that would be used to populate the dropdown lists on the front end web site.  
For example, a list of countries, languages, and also in our case a fixed list 
of crops, all of which can be used to associate as tags for a document when it 
is uploaded.  Is there a standard, accepted way to do this in MarkLogic or 
generally in XML data modelling?  When a user uploads a new document any 
associated tags will then be stored in that document.

The options we've considered are:

1.  We have one document which contains lists of the type:

Afghanistan
Aland Islands
Albania



Arabic
Bambara
Bariba



Apple
Banana
Cocoa

2. Similar to above, but each type is stored in its own document

3.  Each individual item is stored in its own document, and a collection is 
added to help with filtering the relevant document, so we have a collection 
"CountryList" and a collection "LanguageList" or similar.  This seems to fit 
best with the recommendation of "one document is one record" when we try to 
convert our relational database thinking into document style, but makes lots of 
very small document fragments.  This also gives each value a related URI.

The lists may be updated occasionally, but not on a frequent basis.

We'd find it very useful to hear anyone else's experience and recommendations.

Many thanks,
Anne

* Think Green - don't print this email unless you really need to


The information contained in this e-mail and any files transmitted with it is 
confidential and is for the exclusive use of the intended recipient. If you are 
not the intended recipient please note that any distribution, copying or use of 
this communication or the information in it is prohibited.

Whilst CAB International trading as CABI takes steps to prevent the 
transmission of viruses via e-mail, we cannot guarantee that any e-mail or 
attachment is free from computer viruses and you are strongly advised to 
undertake your own anti-virus precautions.

If you have received this communication in error, please notify us by e-mail at 
c...@cabi.org or by telephone on +44 (0)1491 832111 and then delete the e-mail 
and any copies of it.

CABI is an International Organization recognised by the UK Government under 
Statutory Instrument 1982 No. 1071...

**
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] General Digest, Vol 153, Issue 4

2017-03-03 Thread Yogesh Kumar
Hi Geert,

As I wrote in my previous mail I have MarkLogic installed in my desktop
computer. In that I have created a WebDAV server with 8777 port number.
It is created successfully and attached to my module database.
To access files in my module database by file explorer, I am trying to add
network location in my desktop with my WebDAV details which is giving me
the error message "The folder you entered does not appear to be valid.
Please choose another."

Note: I can able to add network location of WebDAV server which is created
in remotely installed MarkLogic. I am facing this issue with MarkLogic
server installed in my machine.


Thanks,
Yogesh

On 03-Mar-2017 1:30 AM,  wrote:

> Send General mailing list submissions to
> general@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-requ...@developer.marklogic.com
>
> You can reach the person managing the list at
> general-ow...@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. Unable to add network location of web dev server (Yogesh Kumar)
>2. Re: Unable to add network location of web dev server
>   (Geert Josten)
>
>
> --
>
> Message: 1
> Date: Thu, 2 Mar 2017 14:21:31 +0530
> From: Yogesh Kumar 
> Subject: [MarkLogic Dev General] Unable to add network location of web
> dev server
> To: general@developer.marklogic.com
> Message-ID:
>  gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Team,
>
> I have ML instance in my local machine. I am trying to add a network
> location for a web dev which I have created in same MarkLogic server.
>
> While doing I am getting the following error.
> "The folder you entered does not appear to be valid. Please choose
> another".
>
> I have entered the path as
> "http://localhost:8777";.
>
>
> Thanks,
> Yogesh
> -- next part --
> An HTML attachment was scrubbed...
> URL: http://developer.marklogic.com/pipermail/general/
> attachments/20170302/bd53d465/attachment-0001.html
>
> --
>
> Message: 2
> Date: Thu, 2 Mar 2017 09:25:02 +
> From: Geert Josten 
> Subject: Re: [MarkLogic Dev General] Unable to add network location of
> web dev server
> To: MarkLogic Developer Discussion 
> Message-ID: 
> Content-Type: text/plain; charset="us-ascii"
>
> Hi Yogesh,
>
> Can you provide more detail?
>
> Cheers,
> Geert
>
> From: mailto:general-
> boun...@developer.marklogic.com>> on behalf of Yogesh Kumar <
> yogiman...@gmail.com>
> Reply-To: MarkLogic Developer Discussion  >
> Date: Thursday, March 2, 2017 at 9:51 AM
> To: "general@developer.marklogic.com marklogic.com>" mailto:general@developer.
> marklogic.com>>
> Subject: [MarkLogic Dev General] Unable to add network location of web dev
> server
>
> Hi Team,
>
> I have ML instance in my local machine. I am trying to add a network
> location for a web dev which I have created in same MarkLogic server.
>
> While doing I am getting the following error.
> "The folder you entered does not appear to be valid. Please choose
> another".
>
> I have entered the path as
> "http://localhost:8777";.
>
>
> Thanks,
> Yogesh
> -- next part --
> An HTML attachment was scrubbed...
> URL: http://developer.marklogic.com/pipermail/general/
> attachments/20170302/0aa982e5/attachment-0001.html
>
> --
>
> ___
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
> End of General Digest, Vol 153, Issue 4
> ***
>
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general