> On Sept. 14, 2019, 4:53 p.m., Madhan Neethiraj wrote: > > intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java > > Lines 71 (patched) > > <https://reviews.apache.org/r/71282/diff/3/?file=2161896#file2161896line71> > > > > I suggest to initialize approximateCount to "-1", to enable > > distinguishing "empty results" from "unavailability of approximate count".
Will do. > On Sept. 14, 2019, 4:53 p.m., Madhan Neethiraj wrote: > > repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java > > Lines 131 (patched) > > <https://reviews.apache.org/r/71282/diff/3/?file=2161902#file2161902line131> > > > > - given "getResultCount()" can only return approximate count, that too > > not in all cases, consider renaming this to "getApproximateResultCount()" > > - and the implementations should return "-1" when approximate count is > > not available That's not true in this case although maybe a bit semantic. This call does get the total result count from the search backend scrubbing happens only after the API call. I suggest leaving it as it might be used in different circumstances in the future (hypothetical: if it would become possible to do scrubbing in the search engine for example). - Bolke ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/71282/#review217737 ----------------------------------------------------------- On Sept. 14, 2019, 12:46 p.m., Bolke de Bruin wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/71282/ > ----------------------------------------------------------- > > (Updated Sept. 14, 2019, 12:46 p.m.) > > > Review request for atlas, Ashutosh Mestry, Aadarsh Jajodia, Sridhar K, Le Ma, > Madhan Neethiraj, and Nixon Rodrigues. > > > Bugs: https://issues.apache.org/jira/browse/ATLAS-3367 > > https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/ATLAS-3367 > > > Repository: atlas > > > Description > ------- > > Both ElasticSearch and SOLR can expose the total count > of results without returning all results. This is useful > to give the user or client an idea how many results there are. > > This patch ensures the total is returned if available. This total > is an approximate as scrubbing of the results still needs to happen. > Therefore, one should not only rely on this information to provide > ,for example, pagination. > > > Diffs > ----- > > intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java > d274cc07e > > repository/src/main/java/org/apache/atlas/discovery/ClassificationSearchProcessor.java > 479ddfd89 > > repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java > c67e34772 > > repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java > f7d8f08c7 > > repository/src/main/java/org/apache/atlas/discovery/FreeTextSearchProcessor.java > 1dd1afaa3 > > repository/src/main/java/org/apache/atlas/discovery/FullTextSearchProcessor.java > 0ffd61c07 > repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java > a7ccaebc8 > > repository/src/main/java/org/apache/atlas/discovery/TermSearchProcessor.java > c253d544b > > > Diff: https://reviews.apache.org/r/71282/diff/3/ > > > Testing > ------- > > > Thanks, > > Bolke de Bruin > >
