Lucene: undefined fields

I just wonder when there is a way to read an unrecognized but indexed field in a Lucene index? I need it because I have an index, and I'm going to iterate over all the documents in the index in order to apply some analysis, and I need to update these documents later in order to update, I need to delete first and when to re-insert the document. The problem is that I do not know when it is generally possible to read undefined fields in order to copy them, as in an updated document.

+3
source share
2 answers

You can use Luke to easily view the index. EDIT: I think I understand the problem now. Here is Andrzej Białacki's proposal, which says: Create an index containing documents with only new / changed fields. Each document in the source index will have a linked document with computed fields. Use ParallelReader to search for pairs of documents that have source and calculated fields.

+1
source

Unmarked fields - this is what - are not saved. Their contents cannot be retrieved from the index.

To do what you said, you have several options:

  • make each field saved so you can create a new document from an existing one
  • (.. ), (.. ). , (.. ),
  • , , . Lucene (v2.2 ). EDIT: , - . .

, , .

0

Source: https://habr.com/ru/post/1715769/


All Articles