cancel
Showing results for 
Search instead for 
Did you mean: 

Help for query in lucene.

joksy
Champ in-the-making
Champ in-the-making
Hi guys,

I have some problem to do a query in lucene. My goal is to search for a specific custom-type which contains a date property, so the point is that I have to filter by this date. I see also some example but all of them are based on the
 @cm\\:created 

My query is below and the point is the part of query in the first +() make no change at all.
At the end my problem is to filter by date, but the date is a property of a custom-type.

<#if companyhome.childByNamePath["CompanyWorkSpace"]?exists>

   <#list companyhome.childrenByLuceneSearch["

         +(@\\{http\\://www.someco.com/model/content/1.0\\}mycustomtype.Start_Date:[2007-11-10 TO 2007-11-14])

         +(TYPE:\"rsi:mycustomtype\")
      
      PATH:\"/app:company_home/cm:CompanyWorkSpace//*\"
                        "] as doc>

Thanks a lot guys,

Best Regards.
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
Have you tried in this way?

+ ( @yourCustomPrefix\\:Start_Date:[2007-11-10T00:00:00 TO 2007-11-14T00:00:00] )
I think you must add your custom prefix and you must define in Lucene all the timestamp (YYYY-MM-DDTHH:mmSmiley FrustratedS) to allow dates comparation.

Hope this helps.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.