AnsweredAssumed Answered

Lucene query buggy? + some logs of LuceneQueryParser(solved)

Question asked by kdejaeger on Apr 17, 2008
Latest reply on Apr 18, 2008 by kdejaeger
Hello everybody. I am completely clueless about a simple lucene query. I am using the stable 2.1.0 release and created a servlet which will query alfresco through webservices.

The class LuceneQueryParser has the following debug :
        Query result = parser.parse(query);
        if (s_logger.isDebugEnabled())
            s_logger.debug("Query " + query + "                             is\n\t" + result.toString());
        return result;
which results in

09:13:44,337 DEBUG [] Query PATH:"/app:company_home/app:user_homes/cm:vivium//*" AND  @eb\:category:"Invoice"                             is
   + +@{eb.model}category:invoice
As you can see, the query I am searching for has Invoice and after the parsing of my query, it becomes invoice.

As a result of that I thought that maybe these properties and searches have to be lower case, well I just wanted to try it, better said. So I changed the content of my files. And changed the query. Restarted alfresco. And the first query I launch results in the following horror :
09:18:29,867 DEBUG [] Query PATH:"/app:company_home/app:user_homes/cm:vivium//*" AND  @eb\:category:"invoice"                             is
   + +@{eb.model}category:invoic
Now he dropped the last e of invoice.

I also give the xml of the category property of the custom content model that I adapted to lowercases:
            <property name="eb:category">
                  can be one of the following : Contract, Invoice, SummaryLetter, BenefitStatement, ExitLetter, 'STPOutput'
                  <constraint type="LIST">
                     <parameter name="allowedValues">