Re: Reuse single document and fields

2008-02-01 Thread Michael McCandless
Right, the value in a Field cannot be null. Mike Jay wrote: You are right, Lucene only gives IllegalArgumentException when the value is null. I assume it won't skip the field is the value is empty or null? Thanks! Jay Michael McCandless wrote: As far as I know, Lucene should accept a f

Re: Reuse single document and fields

2008-02-01 Thread Jay
You are right, Lucene only gives IllegalArgumentException when the value is null. I assume it won't skip the field is the value is empty or null? Thanks! Jay Michael McCandless wrote: As far as I know, Lucene should accept a field with an empty string value -- how did you hit the IllegalArg

Re: Reuse single document and fields

2008-02-01 Thread Michael McCandless
As far as I know, Lucene should accept a field with an empty string value -- how did you hit the IllegalArgumentException? Mike Jay wrote: Thanks, Michael, for your quick reply and explanation. One related question: is it true that Lucene indexer will reject a field that has the empty s

Re: Reuse single document and fields

2008-02-01 Thread Jay
Thanks, Michael, for your quick reply and explanation. One related question: is it true that Lucene indexer will reject a field that has the empty string value? (I saw an IllegalArgumentException). Will be nice if lucene just skip such a field silently, esp, for the new 2.3 api. Jay Michael M

Re: Reuse single document and fields

2008-02-01 Thread Michael McCandless
yu wrote: Hi, I am trying to use the latest 2.3 API on Field to improve the indexing performance by reusing Documents and Fields. After reading lucene-java wiki and the java doc on Field, I have a couple of questions about the comment in Field.setValue(), namely, "Note that you should

Reuse single document and fields

2008-01-31 Thread yu
Hi, I am trying to use the latest 2.3 API on Field to improve the indexing performance by reusing Documents and Fields. After reading lucene-java wiki and the java doc on Field, I have a couple of questions about the comment in Field.setValue(), namely, "Note that you should only use this me