[opencms-dev] Lucene date range search in individual xmlContent date fields

"Rüdiger Kurz (list)" r.kurz at alkacon.com
Wed May 23 10:27:18 CEST 2012


Hi,

 >     <searchsettings>
 >     	<searchsetting element="Date" searchcontent="true"/>
 >     </searchsettings>

There is a field in the lucene index that contains a collection of all 
"plain text" extraction of a resource. The searchsetting tells OpenCms 
to add the referenced element to this "content" field. If you do this 
for an date you will have an extraction String that contains the long 
value of that date. The <searchsetting> is not meant to be a field 
configuration. It's more like an easy way to add/prevent XML elements to 
be searched by the full text search.

To solve your problem, please see the other thread.

Kindly regards
Rüdiger

On 05/23/2012 10:10 AM, ] Code Create [ Bernd Wolfsegger wrote:
> Hi Rüdiger,
>
> yeah, but as I said, even setting searchsettings makes no difference:
>
> <xsd:annotation>
>    <xsd:appinfo>
>     <resourcebundle name="xxxxxxxxxx"/>
>     <preview uri="${previewtempfile}"/>
>     <searchsettings>
>     	<searchsetting element="Date" searchcontent="true"/>
>     </searchsettings>
>   </xsd:appinfo>
> </xsd:annotation>
>
> Anything wrong with the syntax ?
>
> Anyway, the xsd says default is "true" so I shouldn't have to set this.
>
> Kind regards, Bernd
>
>
>> -----Ursprüngliche Nachricht-----
>> Von: "Rüdiger Kurz (list)" [mailto:r.kurz at alkacon.com]
>> Gesendet: Mittwoch, 23. Mai 2012 09:31
>> An: ocms at code-create.de; The OpenCms mailing list
>> Betreff: Re: [opencms-dev] Lucene date range search in individual
>> xmlContent date fields
>>
>> Hi,
>>
>> On 05/23/2012 12:22 AM, ] Code Create [ Bernd Wolfsegger wrote:
>>> Hi Rüdiger,
>>>
>>> I think that's why:
>>>
>>> public class CmsXmlDateTimeValue extends A_CmsXmlValueTextBase {
>>>       public boolean isSearchable() {
>>>
>>>           // there is no point in searching date/time values
>>>           // they are stored as long int anyway
>>>           return false;
>>>       }
>>
>> This is just the default. The concrete search settings are done in the
>> appinfo of the XML Content schema:<xsd:searchsettings>
>>
>>
>>> But even changing this and compiling etc. as well as setting explicit
>> search
>>> annotation in the xsd, doesn't change the behavior.
>>> The field value is not to be found in the extractionResult.
>>>
>>> Kind regards, Bernd
>> - Rüdiger
>>
>> --
>> Kind Regards,
>> Rüdiger.
>>
>> -------------------
>>
>> Visit OpenCms Days 2012 Conference and Expo September 24 to 25, 2012 in
>> Cologne, Germany http://www.opencms-days.org
>>
>> Rüdiger Kurz
>>
>> Alkacon Software GmbH  - The OpenCms Experts
>> http://www.alkacon.com - http://www.opencms.org
>
> _______________________________________________
> 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
>
>
>

-- 
Kind Regards,
Rüdiger.

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

Visit OpenCms Days 2012 Conference and Expo September 24 to 25, 2012 in 
Cologne, Germany http://www.opencms-days.org

Rüdiger Kurz

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org



More information about the opencms-dev mailing list