[ 
https://issues.apache.org/jira/browse/LUCENE-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14258432#comment-14258432
 ] 

Robert Muir commented on LUCENE-3312:
-------------------------------------

{quote}
The main advantage is the fact that IndexReader.document() for stored fields 
does not return something that can be indexed directly using 
IndexWriter.addDocument(), preventing a common trap of people thinking that 
they can update a document by first fetching it from index, modifying it and 
indexing it back.
{quote}

But this premise does not work today still, e.g. because docvalues are treated 
as part of stored fields. so the trap remains.

{quote}
Unfortunately the current implementation is a bit confusing, but I still want 
to go that route.
{quote}

Alternatively, we could just do other work to make that workflow work instead? 
Users want to do it, why not let them?

> Break out StorableField from IndexableField
> -------------------------------------------
>
>                 Key: LUCENE-3312
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3312
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/index
>            Reporter: Michael McCandless
>            Assignee: Nikola Tankovic
>              Labels: gsoc2012, lucene-gsoc-12
>             Fix For: Trunk
>
>         Attachments: LUCENE-3312-DocumentIterators-uwe.patch, 
> LUCENE-3312-reintegration.patch, LUCENE-3312-reintegration.patch, 
> lucene-3312-patch-01.patch, lucene-3312-patch-02.patch, 
> lucene-3312-patch-03.patch, lucene-3312-patch-04.patch, 
> lucene-3312-patch-05.patch, lucene-3312-patch-06.patch, 
> lucene-3312-patch-07.patch, lucene-3312-patch-08.patch, 
> lucene-3312-patch-09.patch, lucene-3312-patch-10.patch, 
> lucene-3312-patch-11.patch, lucene-3312-patch-12.patch, 
> lucene-3312-patch-12a.patch, lucene-3312-patch-13.patch, 
> lucene-3312-patch-14.patch
>
>
> In the field type branch we have strongly decoupled
> Document/Field/FieldType impl from the indexer, by having only a
> narrow API (IndexableField) passed to IndexWriter.  This frees apps up
> use their own "documents" instead of the "user-space" impls we provide
> in oal.document.
> Similarly, with LUCENE-3309, we've done the same thing on the
> doc/field retrieval side (from IndexReader), with the
> StoredFieldsVisitor.
> But, maybe we should break out StorableField from IndexableField,
> such that when you index a doc you provide two Iterables -- one for the
> IndexableFields and one for the StorableFields.  Either can be null.
> One downside is possible perf hit for fields that are both indexed &
> stored (ie, we visit them twice, lookup their name in a hash twice,
> etc.).  But the upside is a cleaner separation of concerns in API....



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to