I think I see, thanks. The design goal for search applications is to
store all the searchable information in the document. Where necessary,
information can also go in the same document's properties.
It sounds like you are using CPF to generate an 'article' XML document
for each binary? In that case it would make sense to store the date in
the document-properties on upload, and move it into the new 'article'
document as part of the CPF processing.
Alternatively, you might decide to store the date in the properties for
all documents. You could use cts:property-query
(http://developer.marklogic.com/pubs/4.1/apidocs/cts-query.html#cts:properties-query)
for queries with a date-based term.
I think I just restarted your four options in a different way, but I
hope it's somewhat helpful.
-- Mike
On 2010-02-25 08:59, Andrew Welch wrote:
On 24 February 2010 20:05, Michael Blakeley
<[email protected]> wrote:
Andrew,
I'm not sure that I understand the problem yet. Some XML could be worth a
hundred words.
Yes, sorry, let me explain with an example. The majority of the XML
is structured basically like this:
<article>
<title>The article title</title>
<date>2010-02-25</date>
<content>the article content...</content>
</article>
We use that date as a facet, and in a date widget similar to that used
on markmail.
We also allow the user to upload non-XML content, such as pdfs, word
and html, which of course don't follow that format and don't contain a
<date> element. The requirement is for the user to provide a date
when uploading the non-XML content and to include these articles in
the date widget, and when filtering using the date facet etc. so that
the user uploaded content appears just like all the other standard
content. There is a "file upload" page where the user provides a date
(and other metadata) when the uploading the file... so the problem is
how to store that date?
So far, the options are:
- store the date in the document properties, and use that if possible
- modify the generated xml to add the date element
- store the date in a separate metadata file, and combine the two
- recreate the above XML for each user added file, and "ignore" the
CPF generated XML
...is there a another way? Do "fields" apply in this situation? (I
haven't had chance to look into these properly yet). If not the last
option seems a reasonable approach to me at the moment...
thanks
andrew
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general