Alfresco lucene search (WS) : Increase size limit

cancel
Showing results for 
Search instead for 
Did you mean: 
jservajean
Active Member

Alfresco lucene search (WS) : Increase size limit

I'm using the webservices APIs to query the repository, but the maximum results I can get is limited to 1000, no matter if the actual query contains more elements.

I found a way to get around that issue with the foundation APIs but couldn't found an equivalent with the webservices APIs.

Could someone give me a clue please ? Here's a piece of code I'm using :

RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory
      .getRepositoryService();

String queryString = "PATH:\"/app:company_home//*\" "
      + "AND (@cm\\:modified:"
      + interval
      + " OR "
      + "@cm\\:created:"
      + interval
      + ") "
      + "+ASPECT:\"cm:titled\" "
      + "-TYPE:\"cm:systemfolder\" -TYPE:\"folder\" "
      + "-TYPE:\"cm:thumbnail\" -TYPE:\"cm:failedThumbnail\" "
      + "-TYPE:\"app:filelink\" -TYPE:\"rule:rule\" -TYPE:\"fm:post\" "
      + "-TYPE:\"dl:task\" -TYPE:\"dl:simpletask\" -TYPE:\"dl:task\"";

//      int batchSize = 5000;
//
//      QueryConfiguration queryCfg = new QueryConfiguration();
//      queryCfg.setFetchSize(batchSize);
//      repositoryService.setHeader(new RepositoryServiceLocator()
//            .getServiceName().getNamespaceURI(), "QueryHeader", queryCfg);

Query query = new Query(Constants.QUERY_LANG_LUCENE, queryString);

// Execute the query
QueryResult queryResult = repositoryService.query(STORE, query, false);

// Display the results
ResultSet resultSet = queryResult.getResultSet();
ResultSetRow[] rows = resultSet.getRows();

if (rows == null) {
   System.out.println("No query results found.");
} else {
   System.out.println("Results from query:" + rows.length);
}
3 Replies
rguinot
Customer

Re: Alfresco lucene search (WS) : Increase size limit

are you using lucene or solr ?
rubberballman
Member II

Re: Alfresco lucene search (WS) : Increase size limit

There are no answer to this post so I have to ask because I'm stuck with the same problem. Have you found a way to increase the size limit?
jeanjot
Active Member

Re: Alfresco lucene search (WS) : Increase size limit

vous êtes sur le forum français merci de changer soir de langue ou soit de forum.