Re: Need change one field type from IntField to String including indexOptions to store positions & Norms
The standard answer is that you need to reindex all of your data. -- Jack Krupansky On Thu, Dec 17, 2015 at 6:10 AM, Kumaran Ramasubramanianwrote: > Dear All > > i am using lucene 4.10.4. Is there any more information i missed to > provide? Please let me know. > > > -- > Kumaran R** > > > > > On Wed, Dec 16, 2015 at 10:35 PM, Kumaran Ramasubramanian < > kums@gmail.com> wrote: > > > > > Hi All, > > > > Previous Post - > > http://www.gossamer-threads.com/lists/lucene/java-user/289159 > > > > i have indexed one field "STATUS" as both IntField & String field > in > > same index. Now i want to take IntField containing documents and change > the > > value of field "STATUS" to string with norms & positions ( to achieve > > phrase query). > > > > But even if i delete that field and index again as String field, *STATUS > > field property of "omitNorms & no positions" are not changing *( which > > are set when it was IntField) > > > > There are around 2 million documents in that index. indexed STATUS field > > as > > IntField - in 1 million documents > > Analyzed String Field - in another 1 million doucments > > > > Basically, am trying to change STATUS field into only one type ( to solve > > http://www.gossamer-threads.com/lists/lucene/java-user/289159) > > > > > > *In index when it was IntField* > > > > > > > > > > > *when i try to change to string from IntField* > > > > stored,indexed,tokenized > > > > > > > > > > *This is how STATUS field looks again in index* > > > > > index cleared> > >> > > > > > > > > > > *code details i am using:* > > > > for IntField, > > IntField intField = new IntField("STATUS", Integer.parseInt(" > > 222 > > "), Field.Store.YES); > > doc > > ument > > .add(intField); > > > > for string field, > > document.add(new Field("STATUS", "lucene index cleared", > Field.Store.YES, > > Field.Index.ANALYZED)); > > > > > > > > Thanks in advance :-) > > > > > > > > -- > > K > > umaran > > R > > > > > > > > >
Re: Need change one field type from IntField to String including indexOptions to store positions & Norms
While Reindexing only am facing this problem. Just to confirm what do you mean by reindex. You mean "delete and add" for all documents by taking data one by one right?? Sent from Phone > On 17-Dec-2015, at 8:53 PM, Jack Krupanskywrote: > > The standard answer is that you need to reindex all of your data. > > -- Jack Krupansky > > On Thu, Dec 17, 2015 at 6:10 AM, Kumaran Ramasubramanian > wrote: > >> Dear All >> >> i am using lucene 4.10.4. Is there any more information i missed to >> provide? Please let me know. >> >> >> -- >> Kumaran R** >> >> >> >> >> On Wed, Dec 16, 2015 at 10:35 PM, Kumaran Ramasubramanian < >> kums@gmail.com> wrote: >> >>> >>> Hi All, >>> >>> Previous Post - >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159 >>> >>> i have indexed one field "STATUS" as both IntField & String field >> in >>> same index. Now i want to take IntField containing documents and change >> the >>> value of field "STATUS" to string with norms & positions ( to achieve >>> phrase query). >>> >>> But even if i delete that field and index again as String field, *STATUS >>> field property of "omitNorms & no positions" are not changing *( which >>> are set when it was IntField) >>> >>> There are around 2 million documents in that index. indexed STATUS field >>> as >>> IntField - in 1 million documents >>> Analyzed String Field - in another 1 million doucments >>> >>> Basically, am trying to change STATUS field into only one type ( to solve >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159) >>> >>> >>> *In index when it was IntField* >>> >>> >> >>> >>> >>> *when i try to change to string from IntField* >>> >>> stored,indexed,tokenized >>> >>> >>> >>> >>> *This is how STATUS field looks again in index* >>> >>> >> index cleared> >>> >>> >>> >>> >>> *code details i am using:* >>> >>> for IntField, >>> IntField intField = new IntField("STATUS", Integer.parseInt(" >>> 222 >>> "), Field.Store.YES); >>> doc >>> ument >>> .add(intField); >>> >>> for string field, >>> document.add(new Field("STATUS", "lucene index cleared", >> Field.Store.YES, >>> Field.Index.ANALYZED)); >>> >>> >>> >>> Thanks in advance :-) >>> >>> >>> >>> -- >>> K >>> umaran >>> R >> - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: Need change one field type from IntField to String including indexOptions to store positions & Norms
Delete the full index and create from scratch with the correct field type, re-adding all documents. Any remnants of the old field must be removed. -- Jack Krupansky On Thu, Dec 17, 2015 at 11:48 AM, Kumaran Rwrote: > While Reindexing only am facing this problem. > > Just to confirm what do you mean by reindex. You mean "delete and add" > for all documents by taking data one by one right?? > > Sent from Phone > > > On 17-Dec-2015, at 8:53 PM, Jack Krupansky > wrote: > > > > The standard answer is that you need to reindex all of your data. > > > > -- Jack Krupansky > > > > On Thu, Dec 17, 2015 at 6:10 AM, Kumaran Ramasubramanian < > kums@gmail.com > >> wrote: > > > >> Dear All > >> > >> i am using lucene 4.10.4. Is there any more information i missed to > >> provide? Please let me know. > >> > >> > >> -- > >> Kumaran R** > >> > >> > >> > >> > >> On Wed, Dec 16, 2015 at 10:35 PM, Kumaran Ramasubramanian < > >> kums@gmail.com> wrote: > >> > >>> > >>> Hi All, > >>> > >>> Previous Post - > >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159 > >>> > >>> i have indexed one field "STATUS" as both IntField & String field > >> in > >>> same index. Now i want to take IntField containing documents and change > >> the > >>> value of field "STATUS" to string with norms & positions ( to achieve > >>> phrase query). > >>> > >>> But even if i delete that field and index again as String field, > *STATUS > >>> field property of "omitNorms & no positions" are not changing *( which > >>> are set when it was IntField) > >>> > >>> There are around 2 million documents in that index. indexed STATUS > field > >>> as > >>> IntField - in 1 million documents > >>> Analyzed String Field - in another 1 million doucments > >>> > >>> Basically, am trying to change STATUS field into only one type ( to > solve > >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159) > >>> > >>> > >>> *In index when it was IntField* > >>> > >>> >>> > >>> > >>> > >>> *when i try to change to string from IntField* > >>> > >>> stored,indexed,tokenized > >>> > >>> > >>> > >>> > >>> *This is how STATUS field looks again in index* > >>> > >>> > > >>> > >>> > >>> > >>> > >>> *code details i am using:* > >>> > >>> for IntField, > >>> IntField intField = new IntField("STATUS", Integer.parseInt(" > >>> 222 > >>> "), Field.Store.YES); > >>> doc > >>> ument > >>> .add(intField); > >>> > >>> for string field, > >>> document.add(new Field("STATUS", "lucene index cleared", > >> Field.Store.YES, > >>> Field.Index.ANALYZED)); > >>> > >>> > >>> > >>> Thanks in advance :-) > >>> > >>> > >>> > >>> -- > >>> K > >>> umaran > >>> R > >> > > - > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >
Re: Need change one field type from IntField to String including indexOptions to store positions & Norms
Hi Jack Krupansky Thanks for the reply. That will work fine. But i am trying to use the stored values instead of hitting database for reindex. Isn't it better way to reindex? Any inputs? -- Kumaran R On Thu, Dec 17, 2015 at 11:50 PM, Jack Krupanskywrote: > Delete the full index and create from scratch with the correct field type, > re-adding all documents. Any remnants of the old field must be removed. > > -- Jack Krupansky > > On Thu, Dec 17, 2015 at 11:48 AM, Kumaran R wrote: > > > While Reindexing only am facing this problem. > > > > Just to confirm what do you mean by reindex. You mean "delete and add" > > for all documents by taking data one by one right?? > > > > Sent from Phone > > > > > On 17-Dec-2015, at 8:53 PM, Jack Krupansky > > wrote: > > > > > > The standard answer is that you need to reindex all of your data. > > > > > > -- Jack Krupansky > > > > > > On Thu, Dec 17, 2015 at 6:10 AM, Kumaran Ramasubramanian < > > kums@gmail.com > > >> wrote: > > > > > >> Dear All > > >> > > >> i am using lucene 4.10.4. Is there any more information i missed to > > >> provide? Please let me know. > > >> > > >> > > >> -- > > >> Kumaran R** > > >> > > >> > > >> > > >> > > >> On Wed, Dec 16, 2015 at 10:35 PM, Kumaran Ramasubramanian < > > >> kums@gmail.com> wrote: > > >> > > >>> > > >>> Hi All, > > >>> > > >>> Previous Post - > > >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159 > > >>> > > >>> i have indexed one field "STATUS" as both IntField & String > field > > >> in > > >>> same index. Now i want to take IntField containing documents and > change > > >> the > > >>> value of field "STATUS" to string with norms & positions ( to achieve > > >>> phrase query). > > >>> > > >>> But even if i delete that field and index again as String field, > > *STATUS > > >>> field property of "omitNorms & no positions" are not changing *( > which > > >>> are set when it was IntField) > > >>> > > >>> There are around 2 million documents in that index. indexed STATUS > > field > > >>> as > > >>> IntField - in 1 million documents > > >>> Analyzed String Field - in another 1 million doucments > > >>> > > >>> Basically, am trying to change STATUS field into only one type ( to > > solve > > >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159) > > >>> > > >>> > > >>> *In index when it was IntField* > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> *when i try to change to string from IntField* > > >>> > > >>> stored,indexed,tokenized > > >>> > > >>> > > >>> > > >>> > > >>> *This is how STATUS field looks again in index* > > >>> > > >>> > > index cleared> > > >>> > > >>> > > >>> > > >>> > > >>> *code details i am using:* > > >>> > > >>> for IntField, > > >>> IntField intField = new IntField("STATUS", Integer.parseInt(" > > >>> 222 > > >>> "), Field.Store.YES); > > >>> doc > > >>> ument > > >>> .add(intField); > > >>> > > >>> for string field, > > >>> document.add(new Field("STATUS", "lucene index cleared", > > >> Field.Store.YES, > > >>> Field.Index.ANALYZED)); > > >>> > > >>> > > >>> > > >>> Thanks in advance :-) > > >>> > > >>> > > >>> > > >>> -- > > >>> K > > >>> umaran > > >>> R > > >> > > > > - > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > > > >
Re: Need change one field type from IntField to String including indexOptions to store positions & Norms
You could certainly read your stored values from your current index and then write new documents to a new index and then use the new index. That's if all of the indexed field values are stored. -- Jack Krupansky On Thu, Dec 17, 2015 at 2:10 PM, Kumaran Ramasubramanianwrote: > Hi Jack Krupansky > > Thanks for the reply. That will work fine. But i am trying to use the > stored values instead of hitting database for reindex. Isn't it better way > to reindex? Any inputs? > > > -- > Kumaran R > > > > > On Thu, Dec 17, 2015 at 11:50 PM, Jack Krupansky > > wrote: > > > Delete the full index and create from scratch with the correct field > type, > > re-adding all documents. Any remnants of the old field must be removed. > > > > -- Jack Krupansky > > > > On Thu, Dec 17, 2015 at 11:48 AM, Kumaran R wrote: > > > > > While Reindexing only am facing this problem. > > > > > > Just to confirm what do you mean by reindex. You mean "delete and add" > > > for all documents by taking data one by one right?? > > > > > > Sent from Phone > > > > > > > On 17-Dec-2015, at 8:53 PM, Jack Krupansky > > > > wrote: > > > > > > > > The standard answer is that you need to reindex all of your data. > > > > > > > > -- Jack Krupansky > > > > > > > > On Thu, Dec 17, 2015 at 6:10 AM, Kumaran Ramasubramanian < > > > kums@gmail.com > > > >> wrote: > > > > > > > >> Dear All > > > >> > > > >> i am using lucene 4.10.4. Is there any more information i missed to > > > >> provide? Please let me know. > > > >> > > > >> > > > >> -- > > > >> Kumaran R** > > > >> > > > >> > > > >> > > > >> > > > >> On Wed, Dec 16, 2015 at 10:35 PM, Kumaran Ramasubramanian < > > > >> kums@gmail.com> wrote: > > > >> > > > >>> > > > >>> Hi All, > > > >>> > > > >>> Previous Post - > > > >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159 > > > >>> > > > >>> i have indexed one field "STATUS" as both IntField & String > > field > > > >> in > > > >>> same index. Now i want to take IntField containing documents and > > change > > > >> the > > > >>> value of field "STATUS" to string with norms & positions ( to > achieve > > > >>> phrase query). > > > >>> > > > >>> But even if i delete that field and index again as String field, > > > *STATUS > > > >>> field property of "omitNorms & no positions" are not changing *( > > which > > > >>> are set when it was IntField) > > > >>> > > > >>> There are around 2 million documents in that index. indexed STATUS > > > field > > > >>> as > > > >>> IntField - in 1 million documents > > > >>> Analyzed String Field - in another 1 million doucments > > > >>> > > > >>> Basically, am trying to change STATUS field into only one type ( to > > > solve > > > >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159) > > > >>> > > > >>> > > > >>> *In index when it was IntField* > > > >>> > > > >>> > > > > >>> > > > >>> > > > >>> > > > >>> *when i try to change to string from IntField* > > > >>> > > > >>> stored,indexed,tokenized > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> *This is how STATUS field looks again in index* > > > >>> > > > >>> > > > > > index cleared> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> *code details i am using:* > > > >>> > > > >>> for IntField, > > > >>> IntField intField = new IntField("STATUS", Integer.parseInt(" > > > >>> 222 > > > >>> "), Field.Store.YES); > > > >>> doc > > > >>> ument > > > >>> .add(intField); > > > >>> > > > >>> for string field, > > > >>> document.add(new Field("STATUS", "lucene index cleared", > > > >> Field.Store.YES, > > > >>> Field.Index.ANALYZED)); > > > >>> > > > >>> > > > >>> > > > >>> Thanks in advance :-) > > > >>> > > > >>> > > > >>> > > > >>> -- > > > >>> K > > > >>> umaran > > > >>> R > > > >> > > > > > > - > > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > > > > > > > >
Re: Need change one field type from IntField to String including indexOptions to store positions & Norms
yes. All fields are stored in index. so sounds like working. Thanks a lot jack :-) Nice to meet you here :-) -- Kumaran R On Fri, Dec 18, 2015 at 12:49 AM, Jack Krupanskywrote: > You could certainly read your stored values from your current index and > then write new documents to a new index and then use the new index. That's > if all of the indexed field values are stored. > > -- Jack Krupansky > > On Thu, Dec 17, 2015 at 2:10 PM, Kumaran Ramasubramanian < > kums@gmail.com > > wrote: > > > Hi Jack Krupansky > > > > Thanks for the reply. That will work fine. But i am trying to use the > > stored values instead of hitting database for reindex. Isn't it better > way > > to reindex? Any inputs? > > > > > > -- > > Kumaran R > > > > > > > > > > On Thu, Dec 17, 2015 at 11:50 PM, Jack Krupansky < > jack.krupan...@gmail.com > > > > > wrote: > > > > > Delete the full index and create from scratch with the correct field > > type, > > > re-adding all documents. Any remnants of the old field must be removed. > > > > > > -- Jack Krupansky > > > > > > On Thu, Dec 17, 2015 at 11:48 AM, Kumaran R > wrote: > > > > > > > While Reindexing only am facing this problem. > > > > > > > > Just to confirm what do you mean by reindex. You mean "delete and > add" > > > > for all documents by taking data one by one right?? > > > > > > > > Sent from Phone > > > > > > > > > On 17-Dec-2015, at 8:53 PM, Jack Krupansky < > jack.krupan...@gmail.com > > > > > > > wrote: > > > > > > > > > > The standard answer is that you need to reindex all of your data. > > > > > > > > > > -- Jack Krupansky > > > > > > > > > > On Thu, Dec 17, 2015 at 6:10 AM, Kumaran Ramasubramanian < > > > > kums@gmail.com > > > > >> wrote: > > > > > > > > > >> Dear All > > > > >> > > > > >> i am using lucene 4.10.4. Is there any more information i missed > to > > > > >> provide? Please let me know. > > > > >> > > > > >> > > > > >> -- > > > > >> Kumaran R** > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> On Wed, Dec 16, 2015 at 10:35 PM, Kumaran Ramasubramanian < > > > > >> kums@gmail.com> wrote: > > > > >> > > > > >>> > > > > >>> Hi All, > > > > >>> > > > > >>> Previous Post - > > > > >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159 > > > > >>> > > > > >>> i have indexed one field "STATUS" as both IntField & String > > > field > > > > >> in > > > > >>> same index. Now i want to take IntField containing documents and > > > change > > > > >> the > > > > >>> value of field "STATUS" to string with norms & positions ( to > > achieve > > > > >>> phrase query). > > > > >>> > > > > >>> But even if i delete that field and index again as String field, > > > > *STATUS > > > > >>> field property of "omitNorms & no positions" are not changing *( > > > which > > > > >>> are set when it was IntField) > > > > >>> > > > > >>> There are around 2 million documents in that index. indexed > STATUS > > > > field > > > > >>> as > > > > >>> IntField - in 1 million documents > > > > >>> Analyzed String Field - in another 1 million doucments > > > > >>> > > > > >>> Basically, am trying to change STATUS field into only one type ( > to > > > > solve > > > > >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159) > > > > >>> > > > > >>> > > > > >>> *In index when it was IntField* > > > > >>> > > > > >>> > > > > > > >>> > > > > >>> > > > > >>> > > > > >>> *when i try to change to string from IntField* > > > > >>> > > > > >>> stored,indexed,tokenized > > > > >>> > > > > >>> > > > > >>> > > > > >>> > > > > >>> *This is how STATUS field looks again in index* > > > > >>> > > > > >>> > > > > > > > > index cleared> > > > > >>> > > > > >>> > > > > >>> > > > > >>> > > > > >>> *code details i am using:* > > > > >>> > > > > >>> for IntField, > > > > >>> IntField intField = new IntField("STATUS", Integer.parseInt(" > > > > >>> 222 > > > > >>> "), Field.Store.YES); > > > > >>> doc > > > > >>> ument > > > > >>> .add(intField); > > > > >>> > > > > >>> for string field, > > > > >>> document.add(new Field("STATUS", "lucene index cleared", > > > > >> Field.Store.YES, > > > > >>> Field.Index.ANALYZED)); > > > > >>> > > > > >>> > > > > >>> > > > > >>> Thanks in advance :-) > > > > >>> > > > > >>> > > > > >>> > > > > >>> -- > > > > >>> K > > > > >>> umaran > > > > >>> R > > > > >> > > > > > > > > - > > > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > > > > > > > > > > > > >
Re: Need change one field type from IntField to String including indexOptions to store positions & Norms
Dear All i am using lucene 4.10.4. Is there any more information i missed to provide? Please let me know. -- Kumaran R** On Wed, Dec 16, 2015 at 10:35 PM, Kumaran Ramasubramanian < kums@gmail.com> wrote: > > Hi All, > > Previous Post - > http://www.gossamer-threads.com/lists/lucene/java-user/289159 > > i have indexed one field "STATUS" as both IntField & String field in > same index. Now i want to take IntField containing documents and change the > value of field "STATUS" to string with norms & positions ( to achieve > phrase query). > > But even if i delete that field and index again as String field, *STATUS > field property of "omitNorms & no positions" are not changing *( which > are set when it was IntField) > > There are around 2 million documents in that index. indexed STATUS field > as > IntField - in 1 million documents > Analyzed String Field - in another 1 million doucments > > Basically, am trying to change STATUS field into only one type ( to solve > http://www.gossamer-threads.com/lists/lucene/java-user/289159) > > > *In index when it was IntField* > >> > > *when i try to change to string from IntField* > > stored,indexed,tokenized > > > > > *This is how STATUS field looks again in index* > > index cleared> >> > > > > > *code details i am using:* > > for IntField, > IntField intField = new IntField("STATUS", Integer.parseInt(" > 222 > "), Field.Store.YES); > doc > ument > .add(intField); > > for string field, > document.add(new Field("STATUS", "lucene index cleared", Field.Store.YES, > Field.Index.ANALYZED)); > > > > Thanks in advance :-) > > > > -- > K > umaran > R > > > >
Need change one field type from IntField to String including indexOptions to store positions & Norms
Hi All, Previous Post - http://www.gossamer-threads.com/lists/lucene/java-user/289159 i have indexed one field "STATUS" as both IntField & String field in same index. Now i want to take IntField containing documents and change the value of field "STATUS" to string with norms & positions ( to achieve phrase query). But even if i delete that field and index again as String field, *STATUS field property of "omitNorms & no positions" are not changing *( which are set when it was IntField) There are around 2 million documents in that index. indexed STATUS field as IntField - in 1 million documents Analyzed String Field - in another 1 million doucments Basically, am trying to change STATUS field into only one type ( to solve http://www.gossamer-threads.com/lists/lucene/java-user/289159) *In index when it was IntField* > *code details i am using:* for IntField, IntField intField = new IntField("STATUS", Integer.parseInt(" 222 "), Field.Store.YES); doc ument .add(intField); for string field, document.add(new Field("STATUS", "lucene index cleared", Field.Store.YES, Field.Index.ANALYZED)); Thanks in advance :-) -- K umaran R