[opencms-dev] Trouble setting up field config in structuredcontent search
Schliemann, Kai
K.Schliemann at comundus.com
Thu Feb 23 08:42:57 CET 2012
Hi Yves,
did you check your index with Luke (http://www.getopt.org/luke/ <http://www.getopt.org/luke/> )?
Are you sure, that you are searching in the correct index (Offline vs. Online)?
A workaround solution might be to index the complete content type and exclude all fields you don’t want.
This can be achieved by adding searchsettings in your schema.
e.g.
<searchsettings>
<searchsetting element="FieldOne" searchcontent="false" />
<searchsetting element="FieldTwo" searchcontent="false" />
</searchsettings>
HTH
Best regards
Kai
Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Yves Glodt
Gesendet: Mittwoch, 22. Februar 2012 23:36
An: The OpenCms mailing list
Betreff: Re: [opencms-dev] Trouble setting up field config in structuredcontent search
I need to add: Since the content-type of the field is OpenCmsHtml, it appears like this in the structured content...
<Text name="Text0">
<links/>
<content><![CDATA[<p>...</p>]]></content>
</Text>
I tried many combinations of Text/Text0/Text[1] and mappings (item and content) but without any result... :)
On 22 February 2012 23:18, Yves Glodt <yg at mind.lu> wrote:
Hello,
I tried both suggestions, but still can not find anything in the index (even using the search-form in the workplace)
This is the resulting config in opencms-search.xml
<indexsource>
<name>Kierchtuermspromenaden</name>
<indexer class="org.opencms.search.CmsVfsIndexer"/>
<resources>
<resource>/sites/Kierchtuermspromenaden/page/</resource>
</resources>
<documenttypes-indexed>
<name>xmlcontent</name>
<name>xmlpage</name>
<name>generic</name>
</documenttypes-indexed>
</indexsource>
<fieldconfiguration>
<name>Kierchtuermspromenaden</name>
<fields>
<field name="Text" display="Text" store="true" index="true">
<mapping type="item">Text[1]</mapping>
</field>
</fields>
</fieldconfiguration>
Any other idea? :-)
On 21 February 2012 09 <tel:2012%2009> :45, Schliemann, Kai <K.Schliemann at comundus.com> wrote:
Hi Yves,
you might have a look at this page: http://www.opencms-wiki.org/Writing_only_specific_xml-element-data_to_the_lucene_index <http://www.opencms-wiki.org/Writing_only_specific_xml-element-data_to_the_lucene_index>
HTH
Best regards
Kai
Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Yves Glodt
Gesendet: Sonntag, 19. Februar 2012 16 <tel:2012%2016> :00
An: The OpenCms mailing list
Betreff: Re: [opencms-dev] Trouble setting up field config in structuredcontent search
Any ideas on this ? :-)
On 5 February 2012 11 <tel:2012%2011> :14, Yves Glodt <yg at mind.lu> wrote:
Hello,
I have a structured content which contains a "Text" field which I want to have indexed. The field is simply set up like this:
<xsd:element name="Text" type="OpenCmsHtml"/>
I created a new field configuration but I fail to get it actually work.
How would the fieldconfiguration need to look like?
This is what I came up with, but as mentioned it does not work... :-)
<fieldconfiguration>
<name>site01</name>
<fields>
<field name="Text" store="true" index="untokenized" excerpt="true">
<mapping type="content"/>
<mapping type="item">Text[1]</mapping>
<mapping type="item">Text0</mapping>
</field>
</fields>
</fieldconfiguration>
Best regards,
Yves
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120223/f5edf9d1/attachment.htm>
More information about the opencms-dev
mailing list