cancel
Showing results for 
Search instead for 
Did you mean: 

LUCENE SAMPLES

ponson
Champ in-the-making
Champ in-the-making
Hi,

I want to use lucene query to search content from alfresco.
Can anybody give me some input for learning lucene?

If you share any example queries, it will be very helpful.

Thanks in advance…
Ponson
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
The wiki page on the Alfresco lucene language additions is a good start:
http://wiki.alfresco.com/wiki/Search

Also you could try enabling DEBUG logging in the web-client for the following class:

org.alfresco.web.bean.SearchContext

So in tomcat that means editing the log4j.properties file and adding this line:

log4j.logger.org.alfresco.web.bean.SearchContext=debug

Then when you use the Simple or Advanced Search in the web-client UI, it will output the generated Lucene query to the alfresco console. As you modify the search you will see the query change - hopefully that will help you learn how we do it Smiley Happy

Thanks,

Kevin

rdanner
Champ in-the-making
Champ in-the-making
The wiki page on the Alfresco lucene language additions is a good start:
http://wiki.alfresco.com/wiki/Search

Also you could try enabling DEBUG logging in the web-client for the following class:

org.alfresco.web.bean.SearchContext

So in tomcat that means editing the log4j.properties file and adding this line:

log4j.logger.org.alfresco.web.bean.SearchContext=debug

Then when you use the Simple or Advanced Search in the web-client UI, it will output the generated Lucene query to the alfresco console. As you modify the search you will see the query change - hopefully that will help you learn how we do it Smiley Happy

Thanks,

Kevin

Or the other approach for those who don't have access to the logs but want to appear as MASTER of QUERIES….. save the search and then go look at the XML file in the data dictionary.

ponson
Champ in-the-making
Champ in-the-making
Hi Thanks for the immediate reply.
Smiley Happy
Regards,
Ponson.