[opencms-dev] Index an XmlContent element - Boolean fields

Steve Bryan steve at bright-interactive.com
Fri Apr 4 16:27:44 CEST 2008


Hi Juan

I also found a problem with searching Boolean elements in xml content - it
just didn't seem to work. Perhaps this is a bug OpenCms developers???

The work-around I have found is to map the boolean elements to properties in
the XML schema, eg
<xsd:annotation> 
  	<xsd:appinfo> 
		<mappings>
			<mapping element="ABoolean"
mapto="property:ABoolean" />
		</mappings>
	</xsd:appinfo> 
  </xsd:annotation>  

Then map the property to the lucene field

    <field name="ABoolean" store="true" index="true">
       <mapping type="property">ABoolean</mapping>
    </field>

The downside of this is that it leads to lots of new un-necessary properties
being defined.

Steve

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

Date: Thu, 3 Apr 2008 17:00:02 +0200
From: Juan Francisco Fern?ndez <juanffernandez at faffe.es>
Subject: Re: [opencms-dev] Index an XmlContent element
To: "'The OpenCms mailing list'" <opencms-dev at opencms.org>
Message-ID: <000c01c8959b$64fb00e0$b000a8c0 at faffe.es>
Content-Type: text/plain;	charset="iso-8859-1"

Well, now it works well for String fields in xml content, but how I
search/index Boolean fields? I have tried to search as the text items, but
it doesnt find anything.

Thanks.







More information about the opencms-dev mailing list