[opencms-dev] Filter search by date

Alessandro Magnolo alessandro.magnolo at gmail.com
Fri Sep 22 15:11:20 CEST 2006


I need to be able to search for documents created/modified in a
certain date range.
I found many hints on the subject in this mailing list, but I'm still
unable perform a working search.

Here are my findings so far:

* org.opencms.search.CmsSearch javadoc states that "the following
fields are available for searching: [...] created, lastmodified
[...]". I included the fields in a jsp search query, but wasn't able
to make them work. What is the syntax to be used to specify a time
range?
I tried for example with lucene syntax "created:[20050422 TO
20060922]" and variations, but they don't work.

* using Luke to browse the opencms lucene indexes, I found that the
"created" and "lastmodified" fields are indeed indexed. Strangely,
even a query performed in Luke on these fields, with known matches,
returns nothing (I tried for example
"lastmodified:20060612141001000").

So, anybody knows how to find results in a date range?

Thank you,
Alessandro Magnolo



More information about the opencms-dev mailing list