cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Search Query

armedia
Champ in-the-making
Champ in-the-making
Hello All,

I'm trying to figure out a way to restrict the search result attributes displayed of the Lucene query.

For example, say I have list of users in the "persons" type. If i want to display just the "firstName" property for a specific "userName" how can i achieve it?

Apporach1:

Get all the properties for particular username:
Query:
TYPE:"cm:Person" AND @userName:testuser

The above query gives me the complete persons object and I would need to loop through the resultset to match the "firstName" attribute. Instead is there a way to get the the attribute 'firstName' in the resultset.  Like a SQL equivalent
Select firstName from persons
.

Thanks
Balaji
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
I suggest you use CMIS search instead, It is more like SQL than Lucene.

armedia
Champ in-the-making
Champ in-the-making
So with CMIS, is there a specific CMIS jar to use or need to use a WSDL to Java util.?