[ https://issues.apache.org/jira/browse/LUCENE-2308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844710#action_12844710 ]
Chris Male edited comment on LUCENE-2308 at 3/12/10 10:01 PM: -------------------------------------------------------------- {quote} I'm not sure if strict immutability is necessary - there's everything in between too. One can simply say that all changes should be made before first use, and after that point it's undefined. {quote} I'm really unsure about this if people are going to be using a FieldType instance with multiple Fields. Perhaps this really is just an edge case though. {quote} Unrelated question: I assume that this would retain the same flexibility as we have today... the ability to change FieldType for field "foo" from one document to the next? {quote} Are you wanting to be able to reuse the same Field instance in both documents while defining separate FieldTypes? Or is creating new Field instances okay? was (Author: cmale): {quote} I'm not sure if strict immutability is necessary - there's everything in between too. One can simply say that all changes should be made before first use, and after that point it's undefined. {quote} I'm really unsure about this if people are going to be using a FieldType instance with multiple Fields. Perhaps this really is just an edge case. {quote} Unrelated question: I assume that this would retain the same flexibility as we have today... the ability to change FieldType for field "foo" from one document to the next? {quote} Are you wanting to be able to reuse the same Field instance in both documents while defining separate FieldTypes? Or is creating new Field instances okay? > Separately specify a field's type > --------------------------------- > > Key: LUCENE-2308 > URL: https://issues.apache.org/jira/browse/LUCENE-2308 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Michael McCandless > > This came up from dicussions on IRC. I'm summarizing here... > Today when you make a Field to add to a document you can set things > index or not, stored or not, analyzed or not, details like omitTfAP, > omitNorms, index term vectors (separately controlling > offsets/positions), etc. > I think we should factor these out into a new class (FieldType?). > Then you could re-use this FieldType instance across multiple fields. > The Field instance would still hold the actual value. > We could then do per-field analyzers by adding a setAnalyzer on the > FieldType, instead of the separate PerFieldAnalzyerWrapper (likewise > for per-field codecs (with flex), where we now have > PerFieldCodecWrapper). > This would NOT be a schema! It's just refactoring what we already > specify today. EG it's not serialized into the index. > This has been discussed before, and I know Michael Busch opened a more > ambitious (I think?) issue. I think this is a good first baby step. We could > consider a hierarchy of FIeldType (NumericFieldType, etc.) but maybe hold > off on that for starters... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org