PaulVrugt commented on issue #398:
URL: https://github.com/apache/lucenenet/issues/398#issuecomment-741691266
@NightOwl888 Thanks! That clarifies a lot and solves a lot of migration
issues! Might I ask some follow up questions?
1. we used to create indexwriters by calling:
`new Index.IndexWriter(_luceneDir, analyzer, False,
Index.IndexWriter.MaxFieldLength.UNLIMITED)`
now I found we need to use the config object instead of separate parameters
in the new situation. So we do somthing like:
````
var config = new Index.IndexWriterConfig(Util.LuceneVersion.LUCENE_48,
analyzer) {OpenMode = Index.OpenMode.APPEND}
New Index.IndexWriter(_luceneDir, config)
````
where do we leave the max field length here? Is it still required?
2. Where did the `Optimize` method of the IndexWriter go? Is there any
alternative?
3. We used to use fields like:
`New Documents.Field("title", "<value>", Documents.Field.Store.YES,
Documents.Field.Index.ANALYZED)`
now the obsolete error tells me I need to use `StringField` or
`TextField`. Which of the two do I need to use, and how to I pass
the `Store` and `Analyzed` properties to them?
4. The FieldCache `GetStrings` method was replace by `GetTerms`, but
`GetTerms` requires an `AtomicReader`, we used to be able to pass an
`IndexReader` into this method and it used to return a string array containing
the values. How to I get the same kind of behavior from the `GetTerms` method?
Sorry about the interrogation, but we really want to migrate, but the the
lack of migration documentation makes it really hard.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]