[opencms-dev] search over compex type's subtype's boolean property

Steve Bryan steve at bright-interactive.com
Mon May 10 10:58:44 CEST 2010


Oops, sent to quickly! I mean:
<field name="chosen" store="true" index="true">
<mapping type="property"> SubThing[1]/Chosen[1]</mapping>
<mapping type="property"> SubThing[2]/Chosen[1]</mapping>
<mapping type="property"> SubThing[3]/Chosen[1]</mapping>
...
<mapping type="property"> SubThing[20]/Chosen[1]</mapping>
</field>

-----Original Message-----
From: Steve Bryan [mailto:steve at bright-interactive.com] 
Sent: 10 May 2010 09:57
To: 'opencms-dev at opencms.org'
Subject: RE: search over compex type's subtype's boolean property

I don't think it recognises the wildcard * notation. You could try having
multiple mappings, if there is a reasonable limit on the number of SubThings
that you can have in a Thing.

eg something like
<field name="chosen" store="true" index="true">
<mapping type="property"> SubThing[1]/Chosen[1]</mapping>
<mapping type="property"> SubThing[1]/Chosen[1]</mapping>
<mapping type="property"> SubThing[1]/Chosen[1]</mapping>
</field>


-----Original Message-----

Date: Fri, 7 May 2010 15:02:32 +0200
From: "Marco Firrincieli" <marco.firrincieli at fullsix.it>
Subject: [opencms-dev] search over compex type's subtype's boolean
	property
To: <opencms-dev at opencms.org>
Message-ID:
	<2F513629C259504FAC798B89C84B5C44BEAFDF at ALBANA.actived.com>
Content-Type: text/plain;	charset="iso-8859-1"

Alright, subject of this email is very weird, I admit.

Here's the thing:
I have my complex type (OpenCmsThing) containing arbitrary number of inner
elements (called SubThing) which are also a complex type.

<xsd:complexType name="OpenCmsThing">
<xsd:sequence>
<xsd:element name="SubThing" type="OpenCmsSubThing"/>
</xsd:sequence>
(...)

And then this subthing has a boolean element:

<xsd:complexType name="OpenCmsSubThing">
<xsd:sequence>
<xsd:element name="Chosen" type="OpenCmsString"/>			?
(...)
<xsd:annotation>
<xsd:appinfo>
<layouts>
<layout element="Chosen" widget="BooleanWidget"/>
</layouts>

What I need to do is search for OpenCmsThings who have AT LEAST one SubThing
that's been chosen (meaning its Chosen element is true)

I made a fieldconfiguration like this:

<fieldconfiguration>
<name>things-with-chosen-subthings</name>
<fields>
<field name="chosen" store="true" index="true">
<mapping type="property"> SubThing[*]/Chosen[1]</mapping>
</field>
</fields>
</fieldconfiguration>

(and there's an index set to use this configuration)

But it is not working at all!
What's wrong?





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

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev

End of opencms-dev Digest, Vol 291, Issue 6
*******************************************




More information about the opencms-dev mailing list