[opencms-dev] Search: field configuration ignored for XML content?

Rüdiger Kurz r.kurz at alkacon.com
Wed Oct 2 21:33:03 CEST 2013


Hi Christian,

in general the title field is as it is shown in your field configuration 
not stored, this means you can search in it, but it will not be part of 
the search result. If you'd like to print out the title use the 
title-key field.

There are currently no issues known that the title field is not 
considered by the Lucene search.

regards
Rüdiger

Am 17.08.2013 05:52, schrieb Christian Steinert:
> Dear All
>
> We are using a custom XML content type. As part of this custom XML content type we also use a custom field configuration for the search.
> In our template code we call CmsSearchBean.setField( new String[] {"title","content"}  ).  The probem is that  the only field that seems to be used by the search index is the "content" field. The content of the title field is ignored.
>
> Did anybody have a similar problem?
>
>
>
> Our field configuration looks like this:
>
>        <fieldconfiguration>
>          <name>berzin</name>
>          <description>bla bla bla...</description>
>          <fields>
>            <field name="content" display="%(key.field.content)" store="compress" index="true" excerpt="true">
>              <mapping type="dynamic" class="com.berzinarchives.cms.search.SearchFieldMappingForPageTitle">Title</mapping>
>              <mapping type="property-search">subtitle</mapping>
>              <mapping type="content"/>
>            </field>
>            <field name="title" display="%(key.field.title)" store="false" index="true" boost="5.0">
>              <mapping type="dynamic" class="com.berzinarchives.cms.search.SearchFieldMappingForPageTitle">Title</mapping>
>            </field>
>            <field name="title-key" display="-" store="true" index="untokenized" boost="0.0">
>              <mapping type="dynamic" class="com.berzinarchives.cms.search.SearchFieldMappingForPageTitle">Title</mapping>
>            </field>
>          </fields>
>        </fieldconfiguration>
>
>
> I have looked at the lucene index with the external tool "luke". With this program I have no problems to search the "title" field and find the expected value that is generated by our dynamic field mapping class. But if I search for the same title in opencms then I get no results.
>
> Any ideas would be appreciated.
>
> Thanks a lot!
> Christian
> _______________________________________________

-- 
Rüdiger Kurz

-------------------

Alkacon Software GmbH - The OpenCms Experts
Rüdiger Kurz
An der Wachsfabrik 13
50996 Koeln, DE



More information about the opencms-dev mailing list