|
From: Doug C. <cu...@ap...> - 2008-03-20 21:11:10
|
Ning Li wrote: > The current Client to Host API is > Results search(NodeID[] nodeIDs, Range[] ranges, Query q, int maxHits) > > It means for each node n in nodeIDs and the correpsonding range r > in ranges, execute query q on node n with range r. The range r should > be a subset of the range that node n serves. In most case, the range r > is the same as the range that node n serves. An exception will be > thrown if either node n is not on the host or range r is not a subset > of the range that node n serves. I probably should change the return > type to Results[] and let the client decide how to combine the results. Yes, this is what I expected, but thanks for clarifying. > Are you suggesting range r be what the client thinks node n serves? > So if only a subset of range r is needed, the results are filtered on > the client? And when range r is different from the range that node n > serves, execute the query anyway and return the results with the > actual range that node n serves? The particular case I'm concerned about is if a Node now serves a subset of the desired range. We could either have such queries fail altogether, or, instead indicate what subset of the desired range was searched. > I think returning partial results is good but is it more efficient to > do filtering on the node/host? In this case, again, range r should > be a subset of the range that node n serves. If range r is not a > subset of the range that node n serves, execute the query on > the overlap range and return the results with the overlap range. Exactly, but the client needs to know what the subset is in order to figure out where gaps are. So maybe we should add a RangeResult subclass of Result that includes a Range, and change ClientToHost#search() to return Result[], as you indicate above. Does that sound right? We don't want to do filtering at the client, since that will substantially complicate facet counts. All filtering must be at the node so that the client can simply sum facet counts. Doug |