Hi Charles,

I would say the answer to your question lies with:

a) how do you want to query your documents? 
and
b) how do you want to update your documents?

In general, you want to query at a fragment root.  So if you will be doing 
queries on /Document/Folder/name, 
/Document/Folder/Schema, and /Document/Folder/Placemark, then you should be 
good for the query side.

As for updates, you can have a lot of contention on that URI during updates if 
multiple threads will be updating that document at the same time (for example, 
to update different parts of it).  If these were different documents, then 
there would be no such contention.

The issue with querying documents with fragmentation lies with the indexes 
being fragment-based, so if you are searching above a fragment root, that can 
become an issue with index resolution accuracy.  If you are searching at the 
fragment root, it should be fine.

Now it might be that none of these things matter to you, in which case this 
approach would be fine.  I don't really know enough about KML to say for sure 
what the answer is here, but all other things being the same, I would say that 
the ideal is to keep each kml document as its own document, but that the 
fragment strategy might also work just fine.

-Danny  

From: [email protected] 
[mailto:[email protected]] On Behalf Of Charles Greer
Sent: Tuesday, August 16, 2011 9:28 AM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Is KML a good candidate for fragment parent 
configuration?

I've been working with InfoStudio to try out various load scenarios with big 
KML files, very pleased overall with the results.

I found that in my first attempts, I hit 'in memory list size" problems with 
them, which made perfect sense; a geographic layer can be a rather large 
document.  So I set 'fragment parent' to be <Folder> and how the files load 
very well.  The KML structure is like this:

<Document>
<Folder>
<name></name>
<Schema></Schema>
<Placemark>polygon data here</Placemark>
<Placemark>polygon data here</Placemark>
<Placemark>polygon data here</Placemark>
<Placemark>polygon data here</Placemark>
....

</Folder>
</Document>

I've heard many times over that it's best not to touch fragment roots or esp. 
fragment parents.  Is this one situation where best practice would be to 
process the KML into smaller documents, or take the path I did and keep the 
files together under one document, with a configured fragment root?

The answer is probably "it depends", but on what?  Thank you all!

Charles
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to