[opencms-dev] Field configuration - OpenCms Search

Andrea Puddu docpuddu at tiscali.it
Thu Oct 23 14:36:58 CEST 2008


Hi everybody,
I'm using the search features to collect specific items in the VFS and 
show them in a sort of organized list-archive.

I'm facing some problems in retrieving data from the xml of my 
content-article.
As explained here 
(http://www.packtpub.com/article/configuring-opencms-search) I've made 
the right mapping between an index field and an xml field.
The result of the configuration can be explained with the following 
piece of xml (opencms-search.xml)

<field name="section" display="Section" store="true" index="true">
            <mapping type="item">Section[1]</mapping>
</field>

The problem occurs when I want to get a deeper xml field.Using Xpath 
syntax, it should be something like:

Teaser[1]/text[1]

(an example of my content article xml)
<Contents xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ....>
    <Content language="en">
        <Section><![CDATA[CRONACA]]></Section>
        <...>
        <Teaser>
                <..>
                <text>....</text>


Is there anyone who made similar mappings and want to share his/her 
experience in composing the path (Xpath) to get it?
Thanks in advance,
Andrea

---------------------------
Andrea Puddu
docpuddu at tiscali dot it
http://www.linkedin.com/in/andreapuddu
-------------------------------------------



<http://opencms7.is.tiscali.com:8080/opencms/opencms/system/workplace/admin/searchindex/fieldconfiguration-overview.jsp#> 




More information about the opencms-dev mailing list