[opencms-dev] Lucene date range search in individual xmlContent date fields

] Code Create [ Bernd Wolfsegger ocms at code-create.de
Wed May 23 11:59:12 CEST 2012

See below

> -----Ursprüngliche Nachricht-----
> Von: "Rüdiger Kurz (list)" [mailto:r.kurz at alkacon.com]
> Gesendet: Mittwoch, 23. Mai 2012 11:37
> An: ocms at code-create.de; The OpenCms mailing list
> Betreff: Re: [opencms-dev] Lucene date range search in individual
> xmlContent date fields
> Hi Bernd,
> > Though, first I had to rewrite all the contents so that the mapping
> takes
> > place.
> Hopefully you rewrote the contents with the workplace context menu

Sure :-)
But there was one obstacle doing so:
If you have a field defined with min occurrence == 1 in the xsd, and you
have added such a field at a later point, all the old content prior to
adding this field will not have that field in the xml code, you first have
to open the specific resource and save it again, than the fields will be
added. That works without a problem, even if you do not save the resource
anew it will be rendered o.k. although the required field is not part of the
Problem is, that using "Touch" in combination with "Rewrite content" will
not work for such resources. There is an exception thrown because of the
missing field. Don't know if this is already known.

(Instead of saving hundreds of resources manually in my case I changed the
xsd setting min occurrence to 0 for the relevant fields. Made no difference
for my generation code)

Kind regards, Bernd

More information about the opencms-dev mailing list