ah! so just so I can get cracking on this - Can you be alittle more
specific? e.g
in my component implementation that runs in the request handling after the
normal QueryComponent,
How would I access the specific field value for the documents that were
retrieved?
i.e how would it fit in a code like this if at all:
// docList is the matching documents for given offset/rows/query
DocIterator it = docList.iterator();
while (it.hasNext()) {
docId = it.next();
score = it.score();
// this would've worked if this was stored field:
// reader.document(docId).get(fieldName)
??
}
On Mon, Dec 6, 2010 at 2:57 PM, Yonik Seeley <[email protected]>wrote:
> On Mon, Dec 6, 2010 at 5:48 PM, Adam H. <[email protected]> wrote:
> > In other words, using a per-segment fieldcache collection as a
> > post-processing step (e.g after QueryComponent did its collection) does
> not
> > seem at all trivial, if at all possible ( is it possible? )
>
> Sure, it's possible, and not too hard (as long as no sort field involves
> score).
> Just instruct the QueryComponent to retrieve the set of all matching
> documents, then you can use that to run then through whatever
> collectors you want again. I've been meaning to implement this
> optimization to field collapsing...
>
> Depending on the details, either replacing the QueryComponent with
> your custom one, or inserting an additional component after the query
> component could make sense.
>
> -Yonik
> http://www.lucidimagination.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>