directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <>
Subject [jira] [Commented] (DIRSERVER-2207) DefaultSearchEngine does not consider sizelimit
Date Thu, 24 Aug 2017 21:32:00 GMT


Emmanuel Lecharny commented on DIRSERVER-2207:

{{sizeLimit}} is handled in the {{SearchRequesHandler.writeResults()}} method.

There is no way the {{SearchEngine}} can know how many entries the server will return, as
it only selects candidates that will be filtered later on. Also the {{SearchEngine}} pull
entry ID from the backend, not full entry so it can't know if the entry matches the full filter
before the evaluation is done. The evaluation is done very late because we don't want to store
all the entries in memory, to be able to handle a use case were the client abandon the request
(or disconnect) before having received all the results.

So bottom line: the {{SearhEngine}} just select the best possible index to run the query,
and fetch the candidates but does not filter the result.

> DefaultSearchEngine does not consider sizelimit
> -----------------------------------------------
>                 Key: DIRSERVER-2207
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0.0-M24
>         Environment: independent
>            Reporter: Sebastian Roland
>            Priority: Minor
>             Fix For: 2.0.0
>   Original Estimate: 48h
>  Remaining Estimate: 48h
> The DefaultSearchEngine is not considering the sizelimit set within the SearchOperationContext
as specified in the SearchEngine interface. As it is the only SearchEngine implementation
for Partitions so far all Partitions are affected.
> This is problematic in the sense that custom interceptors that would like to restrict
the sizelimit based upon certain conditions cannot easily do so by setting the sizelimit on
the SearchOperationContext.
> Currently only the sizelimit set by the client / server is considered. doSimpleSearch()
within the SearchRequestHandler triggers the interceptor processing ending with the call against
the partition which is using the DefaultSearchEngine to obtain the result set (ignoring the
sizelimit). When the result is returned back to the call within doSimpleSearch() the result
set is stripped to the sizelimit set by the client / server (whichever is less).
> To fix the issue the DefaultSearchEngine should consider the sizelimit set within the
SearchOperationContext. Stripping the result set is then obsolete.

This message was sent by Atlassian JIRA

View raw message