Re: [MarkLogic Dev General] dynamic databases

2013-02-12 Thread Erik Hennum
Hi, Sanika:

It's hard to know how to answer without more detail about what you're after.

One way in which MarkLogic is dynamic is that schemas do not have to be defined 
in advance.  If your content / data can be represented as JSON or XML, you can 
store it in the database.  Once it's in the database, you can index it as-is 
and enrich the tagging incrementally.

Another dynamic capability:   range indexes and UDFs gives you real-time 
analysis and aggregation over unstructured information.

Another dynamic capability:  the combination of XQuery and XSLT in the server 
and built-in appserver support let you transform the information returned to 
clients on request.

Then there's Hadoop integration, etc.


Erik Hennum


From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Sanika Shah 
[sanshah...@gmail.com]
Sent: Sunday, February 10, 2013 7:35 PM
To: general@developer.marklogic.com
Subject: [MarkLogic Dev General] dynamic databases

Please explain 'DYNAMIC DATABASES' in MarkLogic.
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Customizing Facets in App Builder (ML6.0)

2013-02-12 Thread Steiner, David J. (LNG-DAY)
I have a few high level constraints/facets that are based on collections (i.e., 
I simply gave no prefix in the specification and I get a facet for collection 
with the counts of all the docs in each collection).

Now, I also have a bunch of other facets that I want to show up but only when 
someone picks a particular content type (different content types have different 
facets), i.e., someone clicks on one of the high level content types.

I'm assuming that the only way I can modify the sidebar behavior for facets is 
to modify javascript - create custom javascript.  Is this correct?  Or is there 
I way I can accomplish this in an easier fashion?
If I have to change the javascript, is there an example of how to do this 
somewhere?

Also, I guess at a minimum, I'd like to have the ability to easily specify 
whether I wanted the facet to appear opened/expanded or closed.  So, for 
example, I'd like my collection facets to appear opened, but other range index 
facets to appear closed since there will be a lot of them and they will each 
have a lot of values.

Thanks,
David
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Marklogic Cluster Setup (Khan, Kashif)

2013-02-12 Thread Khan, Kashif
Thanks Aaron and Mike for the detailed email. Here is what we are trying to do.


  1.  We are trying to set up a Marklogic Cluster of 3 servers for Faileover.
  2.  We do not have GFS/Clustered file system.
  3.  We are trying to find out what are our best options.

From the email chain this is what I understand our options are.

Scenario 1:

  1.  Use dedicated NAS one for each server. A total of 3 dedicated NAS will be 
needed.
  2.  Configure a file replication service to replicate forests among all 3 
instances of  NAS.

Question: is there any documentation on how to configure the replication 
service for Marklogic forest replication?

Scenario 2:

  1.  Use local storage on all three servers
  2.  Configure a file replication service to replicate forests among all 3 
instances of  local storage.

Question: In this scenario if the local storage reached its capacity we can 
not increase the local storage. What are the options if  local storage gets 
maxed out?


Suggestions are most welcome.

__
Kashif Khan




On 2/9/13 6:41 PM, Aaron Rosenbaum 
aaron.rosenb...@marklogic.commailto:aaron.rosenb...@marklogic.com wrote:

Yes, you can use NAS. Like SAN, the key is adequate performance. This is the 
tricky part because getting that performance is very difficult and very 
expensive. When internal policies and infrastructure dictate SAN or NAS, 
dedicated high quality NAS can often be preferable to shared, under provisioned 
SAN (while being cheaper.)

As Mike pointed out, can you maintain HA with your NAS setup? This is 
particular to the unit.

Without a clustered file system, you won't have multiple nodes pointing at same 
volume. Each node should receive dedicated pools and bandwidth.

You should not stripe across all volumes then thin provision out of a single 
pool.

No CIFS, windows shares, SMB. NFS has performance limitations even with 10g 
under Linux. Test, test, test.

It is often overlay services of fancy NAS that kill performance - dedup, 
compression, site-to-site replication, etc that kill performance.

Is this a shared resource? If so, how do ensure enough bandwidth for the 
MarkLogic nodes? How do you ensure you don't destroy the performance of other 
nodes?  You should have explicit visibility and control of each volume.

An example of successful SLA's can be found in Amazons Provisioned IOPS 
storage. While neither SAN nor NAS, it's sets a standard for what you should 
expect/demand from shared storage:
- explicit bandwidth guarantee to the storage pool (110 mb/sec for most high 
end instances - coincidently the practical throughput limit for many NFS 
limitations.)
- guaranteed IOPS at large block sizes for each volume. You need 20 mb/sec per 
forest. 16 forests a node, not unreasonable for a nice system with local 
storage, would need 240,000 IOPS at 4k blocks from your NAS. I think you'll 
find local storage much more cost effective.
- sustained SLA compliance even if maxing out all guarantees. A typical pattern 
sometimes is that a MarkLogic user will ask for that much bandwidth (80K 4k 
IOPS per node) then get laughed at by the storage admins. It's out of band with 
everything they have experience with. MarkLogic can end up looking more like a 
video streaming load than like Oracle. It really uses that much bandwidth and 
if the total provided is less, performance can drop off a cliff.

We are developing guidelines now for AWS storage but one rule of thumb is 
probably useful for NAS also. If you can, provision one volume per forest so 
you can track an allocate performance by volume/forest with less effort.  It 
also will make reallocation of load easier.

Local disk replication will move the copies of forests around for HA. Don't try 
to do that with the disk subsystem.

If you pass along more details as to planned configurations, I may be of more 
help.

Aaron Rosenbaum
Director, Product Management
aaron.rosenb...@marklogic.commailto:aaron.rosenb...@marklogic.com


Sent from my iPhone



An HTML attachment was scrubbed...
URL: 
http://developer.marklogic.com/pipermail/general/attachments/20130208/53611d26/attachment-0001.html
--
Message: 2
Date: Fri, 8 Feb 2013 14:51:30 -0800
From: Michael Blakeley m...@blakeley.commailto:m...@blakeley.com
Subject: Re: [MarkLogic Dev General] Marklogic Cluster Setup
To: MarkLogic Developer Discussion 
general@developer.marklogic.commailto:general@developer.marklogic.com
Message-ID: 
ef106553-25fd-4ee4-9615-4cf50b0e3...@blakeley.commailto:ef106553-25fd-4ee4-9615-4cf50b0e3...@blakeley.com
Content-Type: text/plain; charset=windows-1252
The question which is faster? is impossible to answer generically. It's 
possible to design local storage so that it is slower or faster than a given 
NAS. It's possible to design NAS so that it is slower or faster than given 
local storage. But in most cases it is cheaper to build out similar levels of 
performance from local disk than from NAS (or SAN).

Re: [MarkLogic Dev General] Marklogic Cluster Setup (Khan, Kashif)

2013-02-12 Thread Aaron Rosenbaum
Whether NAS or Local Storage, MarkLogic handles the node-to-node replication. 
Take that out of the scenarios.

For NAS:
Use a single NAS server for all three servers.
Configure dedicated volumes with adequate bandwidth for each server/volume
Use local disk failover (in the docs) to manage node-to-node replication.

For Local Storage:
Add forests/Migrate forests on other hosts before running out of storage.  If 
you've run out of storage on all hosts, there MarkLogic won't function properly 
(or at all.)


I'm referring to NAS here with multiple IO ports on the host, enough spindles 
to keep up, management, etc…not 4 drives with an ethernet port on the back….

-Aaron
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Somebody please help me!

2013-02-12 Thread Raghu
HI all,


I have a parent - detail
with two children -name , value
I wrote an xquery to fetch the document with both name and value (should be
siblings) with 'a' as value
cts:search is working a s expected whereas cts:uris isn't
Please find below the sample xquery
Thanks in advance


xdmp:document-insert(/1.xml,

root

detail

namea/name

valuea/value

/detail

detail

namea/name

valueb/value

/detail

/root

),

xdmp:document-insert(/2.xml,

root

detail

namea/name

valueb/value

/detail

detail

nameb/name

valuea/value

/detail

/root

),

xdmp:document-insert(/3.xml,

root

detail

nameb/name

valueb/value

/detail

detail

nameb/name

valueb/value

/detail

/root

);

(: both children of detail ‘name’ and ‘value’ should have ‘a’ as text
content :)


let $myquery :=  cts:element-query(xs:QName(detail),


  cts:and-query((



cts:element-range-query(xs:QName(name),=,a),



cts:element-range-query(xs:QName(value),=,a)


))


)


return


(


cts:uris/ cts:uri-match results:,


cts:uris('',(),$myquery),


cts:search results:,


cts:search(/root,$myquery)


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


Re: [MarkLogic Dev General] Somebody please help me!

2013-02-12 Thread David Lee
Do you have URI Lexicon enabled for the database ?
Are you getting any errors ? (if so what ?)


-
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.comhttp://www.marklogic.com/


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Raghu
Sent: Tuesday, February 12, 2013 6:21 PM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Somebody please help me!

HI all,


I have a parent - detail
with two children -name , value
I wrote an xquery to fetch the document with both name and value (should be 
siblings) with 'a' as value
cts:search is working a s expected whereas cts:uris isn't
Please find below the sample xquery
Thanks in advance


xdmp:document-insert(/1.xml,
root
detail
namea/name
valuea/value
/detail
detail
namea/name
valueb/value
/detail
/root
),
xdmp:document-insert(/2.xml,
root
detail
namea/name
valueb/value
/detail
detail
nameb/name
valuea/value
/detail
/root
),
xdmp:document-insert(/3.xml,
root
detail
nameb/name
valueb/value
/detail
detail
nameb/name
valueb/value
/detail
/root
);
(: both children of detail 'name' and 'value' should have 'a' as text content :)

let $myquery :=  cts:element-query(xs:QName(detail),

  cts:and-query((


cts:element-range-query(xs:QName(name),=,a),


cts:element-range-query(xs:QName(value),=,a)

))

)

return

(

cts:uris/ cts:uri-match results:,

cts:uris('',(),$myquery),

cts:search results:,

cts:search(/root,$myquery)

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


Re: [MarkLogic Dev General] Somebody please help me!

2013-02-12 Thread Ryan Dew
I believe this is because cts:uris is always unfiltered. You should get the
same result from cts:search result if you passed the 'unfiltered' option. I
believe you can get what you want if you set 'detail' as a fragment root.
You can read about fragment roots here:
http://docs.marklogic.com/guide/admin/fragments#id_34807

I maybe wrong since I've never tested this sort of thing with cts:uris, but
someone smarter than me might be able to have a more certain answer.

-Ryan Dew


On Tue, Feb 12, 2013 at 4:20 PM, Raghu raghupathy.visweswa...@gmail.comwrote:

 HI all,


 I have a parent - detail
 with two children -name , value
 I wrote an xquery to fetch the document with both name and value (should
 be siblings) with 'a' as value
 cts:search is working a s expected whereas cts:uris isn't
 Please find below the sample xquery
 Thanks in advance


 xdmp:document-insert(/1.xml,

 root

 detail

 namea/name

 valuea/value

 /detail

 detail

 namea/name

 valueb/value

 /detail

 /root

 ),

 xdmp:document-insert(/2.xml,

 root

 detail

  namea/name

 valueb/value

 /detail

 detail

 nameb/name

 valuea/value

 /detail

 /root

 ),

 xdmp:document-insert(/3.xml,

 root

  detail

 nameb/name

 valueb/value

 /detail

 detail

 nameb/name

 valueb/value

 /detail

 /root

 );

 (: both children of detail ‘name’ and ‘value’ should have ‘a’ as text
 content :)


 let $myquery :=  cts:element-query(xs:QName(detail),


   cts:and-query((



 cts:element-range-query(xs:QName(name),=,a),



 cts:element-range-query(xs:QName(value),=,a)


 ))


 )


 return


 (


 cts:uris/ cts:uri-match results:,


 cts:uris('',(),$myquery),


 cts:search results:,


 cts:search(/root,$myquery)


 )


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


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


[MarkLogic Dev General] storing a html 'as it is' in xml

2013-02-12 Thread Raghu
Hi All,

Im trying to store a html with empty tags say

html
span class=someclass/span
span class=someclass/span span class=someclass/span
span class=someclassSome text/span
/html

After storing in marklogic I get

html
span class=someclass/
span class=someclass/
span class=someclass/
span class=someclassSome text/span
/html


It is also stripping the spaces and line breaks
And this is causing issues while rendering as html in a few browsers
Is there a way I can store it as it is??
I've tried

declare boundary-space preserve;

declare option xdmp:output indent=no;

 but still no luck

OTHER THAN CDATA/ Binary is there any other way to do this?

Any help is appreciated

Thanks in advance!

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


Re: [MarkLogic Dev General] Somebody please help me!

2013-02-12 Thread Raghu
@Ryan - you are right cts:search is also giving the same results when
unfiltered

Is there an option to make cts:uris/ cts:uri-match behave like a filtered
search??


On Tue, Feb 12, 2013 at 6:31 PM, Ryan Dew ryan.j@gmail.com wrote:

 I believe this is because cts:uris is always unfiltered. You should get
 the same result from cts:search result if you passed the 'unfiltered'
 option. I believe you can get what you want if you set 'detail' as a
 fragment root. You can read about fragment roots here:
 http://docs.marklogic.com/guide/admin/fragments#id_34807

 I maybe wrong since I've never tested this sort of thing with cts:uris,
 but someone smarter than me might be able to have a more certain answer.

 -Ryan Dew


 On Tue, Feb 12, 2013 at 4:20 PM, Raghu 
 raghupathy.visweswa...@gmail.comwrote:

 HI all,


 I have a parent - detail
 with two children -name , value
 I wrote an xquery to fetch the document with both name and value (should
 be siblings) with 'a' as value
 cts:search is working a s expected whereas cts:uris isn't
 Please find below the sample xquery
 Thanks in advance


 xdmp:document-insert(/1.xml,

 root

 detail

 namea/name

 valuea/value

 /detail

 detail

 namea/name

 valueb/value

 /detail

 /root

 ),

 xdmp:document-insert(/2.xml,

 root

 detail

  namea/name

 valueb/value

 /detail

 detail

 nameb/name

 valuea/value

 /detail

 /root

 ),

 xdmp:document-insert(/3.xml,

 root

  detail

 nameb/name

 valueb/value

 /detail

 detail

 nameb/name

 valueb/value

 /detail

 /root

 );

 (: both children of detail ‘name’ and ‘value’ should have ‘a’ as text
 content :)


 let $myquery :=  cts:element-query(xs:QName(detail),


   cts:and-query((



 cts:element-range-query(xs:QName(name),=,a),



 cts:element-range-query(xs:QName(value),=,a)


 ))


 )


 return


 (


 cts:uris/ cts:uri-match results:,


 cts:uris('',(),$myquery),


 cts:search results:,


 cts:search(/root,$myquery)


 )


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



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


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


Re: [MarkLogic Dev General] Somebody please help me!

2013-02-12 Thread Raghu
Introducing fragment roots is it gonna take additional memory/indexes?
Is there an easier way without having to create any fragments/indexes?



On Tue, Feb 12, 2013 at 6:48 PM, Raghu raghupathy.visweswa...@gmail.comwrote:

 @Ryan - you are right cts:search is also giving the same results when
 unfiltered

 Is there an option to make cts:uris/ cts:uri-match behave like a filtered
 search??


 On Tue, Feb 12, 2013 at 6:31 PM, Ryan Dew ryan.j@gmail.com wrote:

 I believe this is because cts:uris is always unfiltered. You should get
 the same result from cts:search result if you passed the 'unfiltered'
 option. I believe you can get what you want if you set 'detail' as a
 fragment root. You can read about fragment roots here:
 http://docs.marklogic.com/guide/admin/fragments#id_34807

 I maybe wrong since I've never tested this sort of thing with cts:uris,
 but someone smarter than me might be able to have a more certain answer.

 -Ryan Dew


 On Tue, Feb 12, 2013 at 4:20 PM, Raghu 
 raghupathy.visweswa...@gmail.comwrote:

 HI all,


 I have a parent - detail
 with two children -name , value
 I wrote an xquery to fetch the document with both name and value (should
 be siblings) with 'a' as value
 cts:search is working a s expected whereas cts:uris isn't
 Please find below the sample xquery
 Thanks in advance


 xdmp:document-insert(/1.xml,

 root

 detail

 namea/name

 valuea/value

 /detail

 detail

 namea/name

 valueb/value

 /detail

 /root

 ),

 xdmp:document-insert(/2.xml,

 root

 detail

  namea/name

 valueb/value

 /detail

 detail

 nameb/name

 valuea/value

 /detail

 /root

 ),

 xdmp:document-insert(/3.xml,

 root

  detail

 nameb/name

 valueb/value

 /detail

 detail

 nameb/name

 valueb/value

 /detail

 /root

 );

 (: both children of detail ‘name’ and ‘value’ should have ‘a’ as text
 content :)


 let $myquery :=  cts:element-query(xs:QName(detail),


   cts:and-query((



 cts:element-range-query(xs:QName(name),=,a),



 cts:element-range-query(xs:QName(value),=,a)


 ))


 )


 return


 (


 cts:uris/ cts:uri-match results:,


 cts:uris('',(),$myquery),


 cts:search results:,


 cts:search(/root,$myquery)


 )


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



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



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


Re: [MarkLogic Dev General] storing a html 'as it is' in xml

2013-02-12 Thread Mary Holstege
On Tue, 12 Feb 2013 15:48:01 -0800, Raghu  
raghupathy.visweswa...@gmail.com wrote:

 It is also stripping the spaces and line breaks
 And this is causing issues while rendering as html in a few browsers
 Is there a way I can store it as it is??

Only if you store it as a binary or plain text document, in which case
you will not be able to do path expressions over it. We don't store
the text of documents, we store an efficient representation of the
data model.

 I've tried

 declare boundary-space preserve;

 declare option xdmp:output indent=no;

  but still no luck

 OTHER THAN CDATA/ Binary is there any other way to do this?

 Any help is appreciated

 Thanks in advance!

 Raghu


I would suggest setting the output method to either HTML or XHTML, so
that the serialization is appropriate for your use:

declare option xdmp:output method=html;

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


Re: [MarkLogic Dev General] Somebody please help me!

2013-02-12 Thread Ryan Dew
You can't have a filtered cts:uris call. You could do
cts:search(/root,$myquery)/fn:base-uri(), but that could be expensive
precisely because it is filtered. Just out of curiosity, though, I tried
setting up the fragment root locally and have confirmed that cts:uris works
as expected with the fragment root.

I'll let an expert speak to the memory impact, but my experience is that
there isn't much of an issue with root fragments. If you already have a lot
of data in your DB then it could take some time re-indexing, but that is
about all I've observed.

-Ryan Dew


On Tue, Feb 12, 2013 at 4:52 PM, Raghu raghupathy.visweswa...@gmail.comwrote:

 Introducing fragment roots is it gonna take additional memory/indexes?
 Is there an easier way without having to create any fragments/indexes?



 On Tue, Feb 12, 2013 at 6:48 PM, Raghu 
 raghupathy.visweswa...@gmail.comwrote:

 @Ryan - you are right cts:search is also giving the same results when
 unfiltered

 Is there an option to make cts:uris/ cts:uri-match behave like a filtered
 search??


 On Tue, Feb 12, 2013 at 6:31 PM, Ryan Dew ryan.j@gmail.com wrote:

 I believe this is because cts:uris is always unfiltered. You should get
 the same result from cts:search result if you passed the 'unfiltered'
 option. I believe you can get what you want if you set 'detail' as a
 fragment root. You can read about fragment roots here:
 http://docs.marklogic.com/guide/admin/fragments#id_34807

 I maybe wrong since I've never tested this sort of thing with cts:uris,
 but someone smarter than me might be able to have a more certain answer.

 -Ryan Dew


 On Tue, Feb 12, 2013 at 4:20 PM, Raghu raghupathy.visweswa...@gmail.com
  wrote:

 HI all,


 I have a parent - detail
 with two children -name , value
 I wrote an xquery to fetch the document with both name and value
 (should be siblings) with 'a' as value
 cts:search is working a s expected whereas cts:uris isn't
 Please find below the sample xquery
 Thanks in advance


 xdmp:document-insert(/1.xml,

 root

 detail

 namea/name

 valuea/value

 /detail

 detail

 namea/name

 valueb/value

 /detail

 /root

 ),

 xdmp:document-insert(/2.xml,

 root

 detail

  namea/name

 valueb/value

 /detail

 detail

 nameb/name

 valuea/value

 /detail

 /root

 ),

 xdmp:document-insert(/3.xml,

 root

  detail

 nameb/name

 valueb/value

 /detail

 detail

 nameb/name

 valueb/value

 /detail

 /root

 );

 (: both children of detail ‘name’ and ‘value’ should have ‘a’ as text
 content :)


 let $myquery :=  cts:element-query(xs:QName(detail),


   cts:and-query((



 cts:element-range-query(xs:QName(name),=,a),



 cts:element-range-query(xs:QName(value),=,a)


 ))


 )


 return


 (


 cts:uris/ cts:uri-match results:,


 cts:uris('',(),$myquery),


 cts:search results:,


 cts:search(/root,$myquery)


 )


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



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




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


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


Re: [MarkLogic Dev General] storing a html 'as it is' in xml

2013-02-12 Thread Damon Feldman
Raghu,

MarkLogic does not store the actual characters in the markup - it stores an 
optimized version of the document and serializes it back out per the XML spec.

However, MarkLogic knows about the XHTML schema, which prohibits some 
self-closing tags like span/. If you put your content in the right namespace 
it should serialize in a way browsers accept. Try this query in queryConsole to 
see the difference between the XHTML namespace and xml that looks enough like 
XHTML to be rendered but is not actually xhtml:

div xmlns=http://www.w3.org/1999/xhtml;/div
,
div xmlns=http://foo;/div

In my version (6.0-2) the former serialized with an explicit close tag but the 
latter serializes as a self-closing tag.

Yours,
Damon
--
Damon Feldman
Sr. Principal Consultant, MarkLogic

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Raghu
Sent: Tuesday, February 12, 2013 6:48 PM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] storing a html 'as it is' in xml

Hi All,

Im trying to store a html with empty tags say

html
span class=someclass/span
span class=someclass/span span class=someclass/span
span class=someclassSome text/span
/html

After storing in marklogic I get

html
span class=someclass/
span class=someclass/
span class=someclass/
span class=someclassSome text/span
/html


It is also stripping the spaces and line breaks
And this is causing issues while rendering as html in a few browsers
Is there a way I can store it as it is??
I've tried


declare boundary-space preserve;

declare option xdmp:output indent=no;

 but still no luck

OTHER THAN CDATA/ Binary is there any other way to do this?

Any help is appreciated

Thanks in advance!

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


Re: [MarkLogic Dev General] Somebody please help me!

2013-02-12 Thread Damon Feldman
Raghu,

Fragment roots are a very advanced configuration and are often not what people 
want. It changes the search behavior in some ways, for instance.

What do you actually need to accomplish? We can advise on how to model the 
data, how to query it and whether fragment roots are what you need.

Yours,
Damon

--
Damon Feldman
Sr. Principal Consultant, MarkLogic


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Raghu
Sent: Tuesday, February 12, 2013 7:10 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Somebody please help me!

Thanks for the quick response Ryan!
I will have to figure out an alternate way then! :)

On Tue, Feb 12, 2013 at 7:03 PM, Ryan Dew 
ryan.j@gmail.commailto:ryan.j@gmail.com wrote:
You can't have a filtered cts:uris call. You could do 
cts:search(/root,$myquery)/fn:base-uri(), but that could be expensive precisely 
because it is filtered. Just out of curiosity, though, I tried setting up the 
fragment root locally and have confirmed that cts:uris works as expected with 
the fragment root.

I'll let an expert speak to the memory impact, but my experience is that there 
isn't much of an issue with root fragments. If you already have a lot of data 
in your DB then it could take some time re-indexing, but that is about all I've 
observed.

-Ryan Dew

On Tue, Feb 12, 2013 at 4:52 PM, Raghu 
raghupathy.visweswa...@gmail.commailto:raghupathy.visweswa...@gmail.com 
wrote:
Introducing fragment roots is it gonna take additional memory/indexes?
Is there an easier way without having to create any fragments/indexes?


On Tue, Feb 12, 2013 at 6:48 PM, Raghu 
raghupathy.visweswa...@gmail.commailto:raghupathy.visweswa...@gmail.com 
wrote:
@Ryan - you are right cts:search is also giving the same results when 
unfiltered

Is there an option to make cts:uris/ cts:uri-match behave like a filtered 
search??

On Tue, Feb 12, 2013 at 6:31 PM, Ryan Dew 
ryan.j@gmail.commailto:ryan.j@gmail.com wrote:
I believe this is because cts:uris is always unfiltered. You should get the 
same result from cts:search result if you passed the 'unfiltered' option. I 
believe you can get what you want if you set 'detail' as a fragment root. You 
can read about fragment roots here: 
http://docs.marklogic.com/guide/admin/fragments#id_34807

I maybe wrong since I've never tested this sort of thing with cts:uris, but 
someone smarter than me might be able to have a more certain answer.

-Ryan Dew

On Tue, Feb 12, 2013 at 4:20 PM, Raghu 
raghupathy.visweswa...@gmail.commailto:raghupathy.visweswa...@gmail.com 
wrote:
HI all,


I have a parent - detail
with two children -name , value
I wrote an xquery to fetch the document with both name and value (should be 
siblings) with 'a' as value
cts:search is working a s expected whereas cts:uris isn't
Please find below the sample xquery
Thanks in advance



xdmp:document-insert(/1.xml,

root

detail

namea/name

valuea/value

/detail

detail

namea/name

valueb/value

/detail

/root

),

xdmp:document-insert(/2.xml,

root

detail

namea/name

valueb/value

/detail

detail

nameb/name

valuea/value

/detail

/root

),

xdmp:document-insert(/3.xml,

root

detail

nameb/name

valueb/value

/detail

detail

nameb/name

valueb/value

/detail

/root

);

(: both children of detail 'name' and 'value' should have 'a' as text content :)



let $myquery :=  cts:element-query(xs:QName(detail),



  cts:and-query((




cts:element-range-query(xs:QName(name),=,a),




cts:element-range-query(xs:QName(value),=,a)



))



)



return



(



cts:uris/ cts:uri-match results:,



cts:uris('',(),$myquery),



cts:search results:,



cts:search(/root,$myquery)



)

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


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



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


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

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


Re: [MarkLogic Dev General] Marklogic Cluster Setup (Khan, Kashif)

2013-02-12 Thread Michael Blakeley
As Aaron pointed out, MarkLogic forest replication is the right way to do this. 
A filesystem-based replication service won't know how to integrate with the 
MarkLogic cluster failover mechanism, and could leave you with a corrupt 
replica just when you need to fail over to it.

What do you do when your local storage is full? Managing local storage isn't 
fundamentally different than adding NAS storage. Add more storage. When the 
chassis fills up, add another chassis. Be sure to pay attention to the 
controller too. I often see systems where the disks themselves are not very 
busy, but the controller is overloaded.

All this underlines the need to do sizing up-front. You should be able to 
create a reasonable sizing model that balances your CPU, memory, disk, and 
network needs in a way that will last for the useful lifetime of the CPUs. Once 
the CPUs are obsolete, it will probably be time to rebuild the application 
anyway. You can migrate to newer hardware at the same time.

-- Mike

On 12 Feb 2013, at 14:13 , Khan, Kashif kashif.k...@hmhco.com wrote:

 Thanks Aaron and Mike for the detailed email. Here is what we are trying to 
 do. 
 
   • We are trying to set up a Marklogic Cluster of 3 servers for 
 Faileover.
   • We do not have GFS/Clustered file system.
   • We are trying to find out what are our best options.
 From the email chain this is what I understand our options are. 
 
 Scenario 1:
   • Use dedicated NAS one for each server. A total of 3 dedicated NAS 
 will be needed.
   • Configure a file replication service to replicate forests among all 3 
 instances of  NAS.
 Question: is there any documentation on how to configure the replication 
 service for Marklogic forest replication?
 
 Scenario 2:
   • Use local storage on all three servers
   • Configure a file replication service to replicate forests among all 3 
 instances of  local storage.
 Question: In this scenario if the local storage reached its capacity we 
 can not increase the local storage. What are the options if  local storage 
 gets maxed out?
 
 
 Suggestions are most welcome.
 
 __
 Kashif Khan
 
 
 
 
 On 2/9/13 6:41 PM, Aaron Rosenbaum aaron.rosenb...@marklogic.com wrote:
 
 Yes, you can use NAS. Like SAN, the key is adequate performance. This is the 
 tricky part because getting that performance is very difficult and very 
 expensive. When internal policies and infrastructure dictate SAN or NAS, 
 dedicated high quality NAS can often be preferable to shared, under 
 provisioned SAN (while being cheaper.)
 
 As Mike pointed out, can you maintain HA with your NAS setup? This is 
 particular to the unit.
 
 Without a clustered file system, you won't have multiple nodes pointing at 
 same volume. Each node should receive dedicated pools and bandwidth.
 
 You should not stripe across all volumes then thin provision out of a single 
 pool.
 
 No CIFS, windows shares, SMB. NFS has performance limitations even with 10g 
 under Linux. Test, test, test.
 
 It is often overlay services of fancy NAS that kill performance - dedup, 
 compression, site-to-site replication, etc that kill performance.
 
 Is this a shared resource? If so, how do ensure enough bandwidth for the 
 MarkLogic nodes? How do you ensure you don't destroy the performance of 
 other nodes?  You should have explicit visibility and control of each 
 volume.  
 
 An example of successful SLA's can be found in Amazons Provisioned IOPS 
 storage. While neither SAN nor NAS, it's sets a standard for what you should 
 expect/demand from shared storage:
 - explicit bandwidth guarantee to the storage pool (110 mb/sec for most high 
 end instances - coincidently the practical throughput limit for many NFS 
 limitations.)
 - guaranteed IOPS at large block sizes for each volume. You need 20 mb/sec 
 per forest. 16 forests a node, not unreasonable for a nice system with local 
 storage, would need 240,000 IOPS at 4k blocks from your NAS. I think you'll 
 find local storage much more cost effective.
 - sustained SLA compliance even if maxing out all guarantees. A typical 
 pattern sometimes is that a MarkLogic user will ask for that much bandwidth 
 (80K 4k IOPS per node) then get laughed at by the storage admins. It's out 
 of band with everything they have experience with. MarkLogic can end up 
 looking more like a video streaming load than like Oracle. It really uses 
 that much bandwidth and if the total provided is less, performance can drop 
 off a cliff.
 
 We are developing guidelines now for AWS storage but one rule of thumb is 
 probably useful for NAS also. If you can, provision one volume per forest so 
 you can track an allocate performance by volume/forest with less effort.  It 
 also will make reallocation of load easier.
 
 Local disk replication will move the copies of forests around for HA. Don't 
 try to do that with the disk subsystem.
 
 If you pass along more details as to planned configurations,