Search code examples
solrlucenealfresco

Lucene query search in Alfresco gives strange result


I've two folders with the following values for title's field : "passement" and "passage".

What I want is to only get the first folder, I'm using then the following query to search it :

@projectName\:title:"*passement*"

The current result gives the two folders, why ?

I'm using Alfresco 4.2.


Solution

  • Because your term/phrase are tokenized before the search. You should use '=' to search for an exact term. e.g.

    =projectName\:title:"*passement*"
    

    https://docs.alfresco.com/4.2/concepts/rm-searchsyntax-exact.html

    Tested on localhost:

    @cm:name:"*Reporter*" 
    

    Found over 100 results
    ...
    Business Trip report #1,2,3...
    ...
    Test report_Adnvin
    ...

    =cm:name:"*Reporter*"
    

    Found 3 results
    Business Trip Reporter
    Test Reporter folder
    Reporter 1