Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field tokenStream should be usable with stored fields. [LUCENE-1699] #2773

Closed
asfimport opened this issue Jun 16, 2009 · 7 comments
Closed

Comments

@asfimport
Copy link

asfimport commented Jun 16, 2009

Field.tokenStream should be usable for indexing even for stored values. Useful for many types of pre-analyzed values (text/numbers, etc)
http://search.lucidimagination.com/search/document/902bad4eae20bdb8/field_tokenstreamvalue


Migrated from LUCENE-1699 by Yonik Seeley (@yonik), 1 vote, resolved Jun 22 2009
Attachments: LUCENE-1699.patch (versions: 2)
Linked issues:

@asfimport
Copy link
Author

Yonik Seeley (@yonik) (migrated from JIRA)

incomplete patch for feedback - needs tests and further work to allow binary field values with token streams (I assume this would be desirable for numeric fields).

@asfimport
Copy link
Author

Mark Miller (@markrmiller) (migrated from JIRA)

Another 2.9 huh? You own it then :)

@asfimport
Copy link
Author

Yonik Seeley (@yonik) (migrated from JIRA)

Watch out - there's a new sheriff in town!

@asfimport
Copy link
Author

Mark Miller (@markrmiller) (migrated from JIRA)

This group could develop hard for the rest of the year no problem by the looks. Someones got to herd these cats. Since we last semi decided it would be a good idea to release 2.9, we have rewritten half the core code base :)

@asfimport
Copy link
Author

Michael McCandless (@mikemccand) (migrated from JIRA)

Patch looks good:

  • Can you make sure CHANGES describes this new behavior (Field is
    allowed to have both a tokenStream and a String/Reader/binary
    value)?

  • The javadoc for readerValue is wrong (copy/paste from stringValue)

  • Can you spell out more clearly in the javadocs that even when a
    tokenStream value is set, one of String/Reader/binary may also be
    set, or, not, and if so, that "other" value is only used for
    stored fields. Eg, explain why one would use setTokenStream
    instead of setValue(TokenStream value).

@asfimport
Copy link
Author

Yonik Seeley (@yonik) (migrated from JIRA)

Patch attached.

I've attempted to clean up some of the semantics of Fieldable - it's really a reasonable interface, with just a few redundancies (isBinary/getBinary). I've purposely avoided messing with Field more than necessary (adding yet more constructors, constants, etc).

This change is back compatible as it just removes some unnecessary restrictions. I'll commit in a few days.

@asfimport
Copy link
Author

Yonik Seeley (@yonik) (migrated from JIRA)

committed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants