cancel
Showing results for 
Search instead for 
Did you mean: 

Lucen Query in alfresco for Exact property match only

deeps
Champ in-the-making
Champ in-the-making
I am using below query to search document. My first query is=

TYPE:"hr:hrdoctype" AND @cm\:name:"E1"
and my second query is=

TYPE:"hr:hrdoctype" AND @cm\:name:"E2"
Here its giving the proper result.

But there is one problem, that if i will use

TYPE:"hr:hrdoctype" AND @cm\:name:"E"
Then it is displaying both records that is E1 and E2. But I don't have any record with name E. So is there any to get exact match?

Here, my requirement is if I search with name E it should not have to display any record. The record should display only when exact match occurs.

Can anyone help me with this requirement?

I think it happens because of it is tokenized in alfresco for full text search. But my requirement is different.

I am using alfresco 5.0.d

Please provide a way.

Thanks in advance.
1 REPLY 1

niketapatel
Star Contributor
Star Contributor
For lucene to search exact term you need to make tokenized false for cm:name. Rather than modifying OOB proepry its better to create your custom one.

Other opetion is to use fts-alfresco. Try this query which will give you exact match.


TYPE:"hr:hrdoctype" AND =@cm\:name:"E"