AnsweredAssumed Answered

Webservice lucene Search Problem

Question asked by alvisccc on May 11, 2010
Latest reply on Jul 8, 2010 by swardi
Hi everybody,

I am using webservice api to perform a simple lucene search,the code looks like this:

Query query = new Query(Constants.QUERY_LANG_LUCENE,"PATH: \"//app:company_home/cm:"+ISO9075.encode

("loadTest")+"//*\" "  +  " AND TYPE:\"custom:patientRecord\"");

QueryResult queryResult = WebServiceFactory.getRepositoryService().query(STORE, query, false);

It spent lots of time(about 1 min ) in querying the folder loadTest if the folder contains 10000 documents.If folder contains 1000 documents,searching time is about 10 secs.The queryResult.getResultSet().getTotalRowCount() equals 10000,is that means the query is searching all the documents

under loadTest folder ? If yes, are there any methods that can be shorten the searching time.For example only search first one thousand(1000) documents and then return queryResult?

i can't find out a solution that can limit the searching operations by adding parameter to lucene query string ,in java code or even configuartion files in alfresco.Please help me !


Best Regards,