[
https://issues.apache.org/jira/browse/LUCENE-5327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13818392#comment-13818392
]
John Wang commented on LUCENE-5327:
-----------------------------------
Perhaps I should have explained our usecase, which is to build up the search
results.
After a search, you essentially get a set of internal docids, they are not
useful to the application. On the IndexSearcher API, the apis you use to build
up the search result, as your said, are document() call. Calling document to
extract stored fields essentially is too expensive for us. Instead, we keep an
application per document UID in a numeric docvalue. Our search result is
basically a list of these UIDs and further result decoration is done higher up
in the application logic. I have seen this pattern in numerous Lucene
applications.
This is essentially the motivation behind this ticket. Currently, to do this I
am essentially writing this code:
Get in the underlying IndexReader for the IndexSearcher
and
for each ScoreDoc:
find the atomicReader for ScoreDoc.doc
return atomicReader.getNumericDocValue(ScoreDoc.doc - base);
This is a little cumbersome, it would be nice to allow the IndexSearcher return
the uid in the likeness of the document call.
I am happy to close this ticket if you guys don't think this API is useful.
Thanks
-John
> Expose getNumericDocValues and getBinaryDocValues at toplevel reader and
> searcher levels
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-5327
> URL: https://issues.apache.org/jira/browse/LUCENE-5327
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/search
> Affects Versions: 4.5
> Reporter: John Wang
> Attachments: patch.diff
>
>
> Expose NumericDocValues and BinaryDocValues in both IndexReader and
> IndexSearcher apis.
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]