[opencms-dev] Search Management and advanced XML content

Steve Bryan steve at bright-interactive.com
Thu Nov 29 11:15:42 CET 2007

For the first problem, a partial solution is to add many mappings of the
element to one Lucene field, as in the following example extract from
opencms-search.xml. This lets you search in a number N of occurrences of a
given item, but not all of them if there are more than N. I would be
interested if there was a better solution.

                    <field name="Holiday" store="false" index="true">
                        <mapping type="item">Holiday[1]</mapping>
                        <mapping type="item">Holiday[2]</mapping>
                        <mapping type="item">Holiday[3]</mapping>
                        <mapping type="item">Holiday[4]</mapping>
                        <mapping type="item">Holiday[5]</mapping>
                        <mapping type="item">Holiday[6]</mapping>
                        <mapping type="item">Holiday[7]</mapping>
                        <mapping type="item">Holiday[8]</mapping>
                        <mapping type="item">Holiday[9]</mapping>
                        <mapping type="item">Holiday[10]</mapping>
                        <mapping type="item">Holiday[11]</mapping>
                        <mapping type="item">Holiday[12]</mapping>
                        <mapping type="item">Holiday[13]</mapping>
                        <mapping type="item">Holiday[14]</mapping>
                        <mapping type="item">Holiday[15]</mapping>
                        <mapping type="item">Holiday[16]</mapping>
                        <mapping type="item">Holiday[17]</mapping>
                        <mapping type="item">Holiday[18]</mapping>
                        <mapping type="item">Holiday[19]</mapping>
                        <mapping type="item">Holiday[20]</mapping>


From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Stéphane Verger
Sent: 27 November 2007 16:31
To: The OpenCms mailing list
Subject: [opencms-dev] Search Management and advanced XML content

Hi !

I have 2 questions about search about  XML content files.

I found that we must write : elementname[1]  to scan the first occurence of
an item of an XML content file.
I wonder how can we write when we want to scan all the occurences of an
unbounded item?
For example, elementname[1], elementname[2], elementname[...]
Is there a symbol to exprim all the occurences?

In case of an advanced XmlContent file, with an element which type is a Xml
content type, how can we scan in the sub-element of this element?



More information about the opencms-dev mailing list