|
From: Doug C. <cu...@ap...> - 2008-04-02 18:01:17
|
Ning Li wrote: > On Fri, Mar 28, 2008 at 5:42 PM, Doug Cutting <cu...@ap...> wrote: >> I think we should add a Range element to Query that narrows it. But we >> first need to define what it means in terms of other public API >> elements. I think we define it in terms of the document's "position" >> field, which is the hashCode of its id by default, but can be explicitly >> specified. Does that sound right? > > I realize, we'll have to add getDoc(String id, int position) in addition to > adding search(Range range, Query q, int maxHits) to Database? Yes. getDoc(id) should not be abstract, but should use the default hash function and call getDoc(id, position). Applications that explicitly specify positions when adding documents must always call getDoc(id, position). We should perhaps mark the methods that take an explicit position as "Expert" or somesuch? Doug |