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

] Code Create [ Bernd Wolfsegger ocms at code-create.de
Tue May 22 18:34:54 CEST 2012


Hi Rüdiger,

thanx for your answer.

As I understood it, Lucene (up to version 2.9) range search is only done
lexographically, so date values have to be saved in the index in a string
format like "yyyyMMddHHmmss".
Search itself is handled by lucene then.
So does OpenCms store its "date" xml content values (as defined in an xml
content schema) that way in the index when mapped for a file via the field
configuration?
Or do you have to write that extra lines of Java classes for this purpose :)

Is there a difference between OpenCms 7.5.x and 8.0.x in that matter? Lucene
2.9 and up is capable of handling other than String data.

By the way. I don't want to restrict my search to date values. I'd like to
include search for dates and date ranges transparently with searching in
other text fields.

So one is able to search by: "mydate:[201205 TO 201206]"
As well as: "some other searchterm"

Kind regards, Bernd


> -----Ursprüngliche Nachricht-----
> Von: "Rüdiger Kurz (list)" [mailto:r.kurz at alkacon.com]
> Gesendet: Dienstag, 22. Mai 2012 16:51
> An: ocms at code-create.de; The OpenCms mailing list
> Betreff: Re: [opencms-dev] Lucene date range search in individual
> xmlContent date fields
> 
> Hi,
> 
> performance is the reason for not using "long" values to search for
> date
> ranges.
> 
> If you want to restrict your search based on an individual dates
> specified in a schema of an XML content. You don't come along writing
> some lines of Java classes, compile them and put them into the class
> path of the servlet container.
> 
> Please let me know, if this would be a possibility for you.
> 
> greetings
> Rüdiger
> 
> On 05/22/2012 04:36 PM, ] Code Create [ Bernd Wolfsegger wrote:
> > Hi,
> >
> > does anyone know how to accomplish this, if it is possible at all?
> > I have no problem searching with a query like: "created:[201205 TO
> 201206]"
> > But how do I configure fields to search in for my own specific xml-
> content
> > date fields?
> > I tried a field configuration where I mapped an xml-content date
> field, but
> > I didn't get any results in the search.
> > I'm using the Lucene Snowball analyzer (2.4.1)
> >
> > Anyone tried similar stuff ? :-)
> >
> > Thanx for any hints.
> >
> > Still using OpenCms 7.5.1
> >
> >
> > Kind regards, Bernd
> >
> > _______________________________________________
> > 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