AnsweredAssumed Answered

dot and dash in Lucene queries

Question asked by pcuvecle on Nov 27, 2007
Latest reply on Dec 14, 2007 by kevinr
Hi all,

I have created a cm:content with  :
name : 08.DP.01 MNJ.pdf
title : 08-DP-01 MNJ

and I face some strange behaviors when trying to search for my document
Here are the tests I did from the webclient :
In quick search (supposed to combine a TEXT + cm:name search)
08.DP >> no results
08\.DP >> document found
08.DP* >> document found
08.DP.01 >> document found
08 >> document found

Is there a special meaning in searching for a sentence with a single "dot" in it ? Do one need to espace the dot ?

Now from the advanced search : search on cm:title only
08-DP-01 MNJ >> not found
because translated into this lucene query :+@\{http\://\}title:'08\-DP\-01 MNJ"   The problem is that the query builder considers that it is a sentence because of the space after 01 but still escapes automaticaly the dashes. When running the same lucene query without the backslash (+@\{http\://\}title:'08-DP-01 MNJ" )
the document is found, but unfortuanately it is not what is done from the advanced search

other test :
08-DP-01 >> document found because there is no space, so it is translated  witout double quotes: +@\{http\://\}title:08\-DP\-01

So how can I search for a complete title such as "08-DP-01 MNJ" ?

Thanks in advance for you help  :)