You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2011/07/13 22:00:00 UTC

[jira] [Updated] (LUCENE-3309) Add narrow API for loading stored fields, to replace FieldSelector

     [ https://issues.apache.org/jira/browse/LUCENE-3309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-3309:
---------------------------------------

    Attachment: LUCENE-3309.patch

Initial patch:

  - Adds IndexReader.FieldVisitor and abstract
    IndexReader.document(int docID, FieldVisitor visitor).  IR
    subclasses and FieldsReader implement this.

  - Stop storing tokenized bit in stored fields -- the fast vector
    highlighter was actually using this metadata; I change it to
    always insert the separator char (even for not-analyzed fields)
    and changed the keyword analyzer in the tests to set offset gap
    to 1.  We need to do this anyway for LUCENE-2309, and since we are
    making an API here we may as well remove it now...

  - Implement IndexReader.document(int) using only the new
    FieldVisitor API.

All tests pass.

I think next up is to cutover the various FieldSelector impls to
FieldVisitor impls, move them to contrib, and then remove
FieldSelector from core.


> Add narrow API for loading stored fields, to replace FieldSelector
> ------------------------------------------------------------------
>
>                 Key: LUCENE-3309
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3309
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/index
>            Reporter: Michael McCandless
>             Fix For: Field Type branch
>
>         Attachments: LUCENE-3309.patch
>
>
> I think we should "invert" the FieldSelector API, with a "push" API
> whereby FieldsReader invokes this API once per field in the document
> being visited.
> Implementations of the API can then do arbitrary things like save away
> the field's size, load the field, clone the IndexInput for later lazy
> loading, etc.
> This very thin API would be a mirror image of the very thin index time
> API we now have (IndexableField) and, importantly, it would have no
> dependence on our "user space" Document/Field/FieldType impl, so apps
> are free to do something totally custom.
> After we have this, we should build the "sugar" API that rebuilds a
> Document instance (ie IR.document(int docID)) on top of this new thin
> API.  This'll also be a good test that the API is sufficient.
> Relevant discussions from IRC this morning at
> http://colabti.org/irclogger/irclogger_log/lucene-dev?date=2011-07-13#l76

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org