lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4101) Remove XXXField.TYPE_STORED
Date Fri, 08 Jun 2012 14:29:23 GMT


Robert Muir commented on LUCENE-4101:

Thinking about this issue a bit, I think its bad if you have to use Field/FieldType api just
to store a field.
So I agree this should be fixed.

Separately we should also make it easy to have a stored-only (not indexed) field. 

I felt like both of these things were easy with the old document API.

A third option is to add boolean isStored to each of XXXFields? So, it's not stored by default,
but then you can do:

I don't like that we are making our apis hard to use just because java doesn't have named
parameter passing or something.
I think the old API was great here: it had an enum for Stored so it was totally obvious from
your code if it was stored or not,
or indexed or not.

I think if we dont like booleans for this silly reason, then we should just use an enum like
the old API!

Extra Stored* classes for each field are just overwhelming.

I can't see a situation where having to add the same field twice with different flags is good
from a usability standpoint.

We can never force that. People who are experts or committers are free to add the field twice
they want to (nothing stops them), but I don't want to see this forced in our APIs, its too

> ---------------------------
>                 Key: LUCENE-4101
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Blocker
>             Fix For: 4.0, 5.0
>         Attachments: LUCENE-4101.patch, LUCENE-4101.patch
> Spinoff from LUCENE-3312.
> For 4.0 I think we should simplify the sugar field APIs by requiring
> that you add a StoredField if you want to store the field.  Expert users
> can still make a custom FieldType that both stores and indexes...

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message