Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] Search API

Hello

On Fri, Nov 20, 2015 at 12:57 PM, Sirich, Rima <rima.sirich@xxxxxxx> wrote:

Hello,

 

I have a question regarding Search API. Due to Search API documentation,  there is an optional parameter maxItems - Maximum items to display. If this parameter is dropped, there are no limits.

In practice, each search request with large amount of results ( > 1000 ) will end with server exception “Too many (4985) matched results found.”.

/platform-api/che-core-api-vfs/src/main/java/org/eclipse/che/api/vfs/server/search/LuceneSearcher.java implementation ignores maxItems parameter since

if (topDocs.totalHits > RESULT_LIMIT) {

throw new ServerException(String.format("Too many (%d) matched results found. ", topDocs.totalHits));

}


Yes. It sounds like a wrong decision. And I think this part of the code has incorrect  implementation.
May be something like this would work better http://stackoverflow.com/a/24533377


Paging optional parameter - skipCount - is ignored as well.

Yep. It may be better to add it QueryExpression and send to  LuceneSearcher.

So my question is: what is the way to perform search request with large amount of results and to get partial set of results ?

 

If you can propose PR we will definitely pay great attention to it.
 

Thanks & Regards,

Sirich Rima,

SAP Labs Israel

 


Thanks 
Sergii Kabashniuk

 
_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev



Back to the top