Hi All,
I am working on implementing of an in place reindex using Lucene. In my
case, I have BSON document stored in a binary field and have a set of rules
that pull fields out of the BSON and indexes them into different Lucene
fields with different analyzers. I would like to be able to change these
rules / schema and then iterate over the documents, indexing them using the
new schema.
I have come up with the following code block:
https://gist.github.com/mdavis95/f600e0a8233d0a1232eff77645d1dc8a
I have two questions:
1) Is this a good way to iterate over the documents
2) How can I manage documents changing when I am doing this. New documents
coming in should be fine I believe but changes to existing documents could
be lost if I understand correctly.
I hope that this is the right place to ask this question and I apologize if
this is obvious or has been asked and answered.
Thanks,
Matt
I am working on implementing of an in place reindex using Lucene. In my
case, I have BSON document stored in a binary field and have a set of rules
that pull fields out of the BSON and indexes them into different Lucene
fields with different analyzers. I would like to be able to change these
rules / schema and then iterate over the documents, indexing them using the
new schema.
I have come up with the following code block:
https://gist.github.com/mdavis95/f600e0a8233d0a1232eff77645d1dc8a
I have two questions:
1) Is this a good way to iterate over the documents
2) How can I manage documents changing when I am doing this. New documents
coming in should be fine I believe but changes to existing documents could
be lost if I understand correctly.
I hope that this is the right place to ask this question and I apologize if
this is obvious or has been asked and answered.
Thanks,
Matt