cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco lucene search (WS) : Increase size limit

jservajean
Confirmed Champ
Confirmed Champ
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 3

rguinot
Confirmed Champ
Confirmed Champ
are you using lucene or solr ?

rubberballman
Champ in-the-making
Champ in-the-making
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
Confirmed Champ
Confirmed Champ
vous êtes sur le forum français merci de changer soir de langue ou soit de forum.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.