AnsweredAssumed Answered

Problem lucene filter with dot and dash

Question asked by joseacc on Feb 22, 2010
Latest reply on Mar 12, 2010 by joseacc
Hi.

In a Lucene query, filtering using a dash not return records.

For example:

My definition of metadata filtering is…
<property name="reg:code">
<title>Code Reg</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>

With values…
Z-2010-00001
Z-2010-00002
Z-2010-00003

My implementation of the search is…
SearchParameters sp = new SearchParameters();
sp.setLanguage(SearchService.LANGUAGE_LUCENE);

String query = new String("PATH:\"/app:company_home/st:sites/cm:mysite//*\" AND @reg\\:code:\"Z-2010-*\"");
ResultSet resultsLucene = webScriptHelper.getServices().getSearchService().query(sp);

However if I use the filter @reg\\:code:\"Z-2010-0*\" if return records.

It seems that this filter "-*" does not work. Also fails using filters with dot (for example, "exam*.txt").

I configured the Spanish language in Alfresco and use Alfresco Community v3.2r (build 2384, schema=3003) - Preconfigured Tomcat bundle.

Any ideas?

Thanks

Outcomes