cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Query to search on all metadata

himvj
Champ in-the-making
Champ in-the-making
Hi,

I want to know the lucene query to search on all the metadata in alfresco,
i have one query which search on a particular metadata like name.

ex.

query.statement = "@cm\\:name:\"" + filename + "\" PATH:\"/app:company home\"";

but i want to search on all the metadata say title,name,date,created,modified etc…

How to do that

Regards
Himvj
3 REPLIES 3

absolut56
Champ in-the-making
Champ in-the-making
You can search those metadata too using an AND operator in the Lucene query. You just need the namespace prefix of the property and the name of it. You are already doing the same in:

"@cm\\:name:\""

Regards

himvj
Champ in-the-making
Champ in-the-making
Thanks absolut56,

for the reply but in that case we will have to specify all the metadata.

I have got the solution

if we use ALL keyword in search query then no need to specfy the metadata automatically it will search in all the metadata.


Regards
Himvj

andy
Champ on-the-rise
Champ on-the-rise
Hi

ALL will work - it may not be fast as it will expand to all.
Better to pick the properties you want and define a macro for easy expansion.

Andy