You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "ArtemLukanin-TomTom (via GitHub)" <gi...@apache.org> on 2023/08/05 21:27:32 UTC

[GitHub] [lucene] ArtemLukanin-TomTom commented on issue #10374: Require consistency between data-structures on a per-field basis [LUCENE-9334]

ArtemLukanin-TomTom commented on issue #10374:
URL: https://github.com/apache/lucene/issues/10374#issuecomment-1666612060

   In Lucene 8 it was possible to add stored and indexed fields separately to the document (because they are effectively written to different files). In Lucene 9 after this change it does not work any more. E.g.
   ```
   doc.add(new Field("title", "Book", StoredField.TYPE);
   doc.add(new Field("title", "book", StringField.TYPE_NOT_STORED);
   doc.add(new Field("title", "Another Book", StoredField.TYPE);
   doc.add(new Field("title", "another", StringField.TYPE_NOT_STORED);
   doc.add(new Field("title", "book", StringField.TYPE_NOT_STORED);
   ```
   Does it mean, that I can use only this code?:
   ```
   doc.add(new Field("title", "Book", StringField.TYPE_STORED);
   doc.add(new Field("title", "Another Book", StringField.TYPE_STORED);
   ```
   In the last case I cannot control stored and index values separately, but have to use an common analyzer.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org