lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucenenet] NightOwl888 commented on issue #398: Migrating from lucene.net 3.0 to 4.8
Date Wed, 09 Dec 2020 14:06:06 GMT

NightOwl888 commented on issue #398:
URL: https://github.com/apache/lucenenet/issues/398#issuecomment-741792210


   > Sorry about the interrogation, but we really want to migrate, but the the lack of
migration documentation makes it really hard.
   
   The migration guide is here: [Apache Lucene Migration Guide (4.8.0)](https://lucene.apache.org/core/4_8_0/MIGRATE.html).
Thanks for bringing this to our attention, it hasn't been added to our API docs, so I opened
#399.
   
   Most of the answers to your questions can be found in the migration guide. However, do
note that some method names were changed to follow .NET conventions (for example `.terms()`
was renamed `.GetTerms()`, `.iterator()` has been changed to `.GetEnumerator()`, members with
numeric type names have also been renamed `Int` > `Int32`, `Long` > `Int64`, `Float`
> `Single`, etc.)
   
   > Where did the Optimize method of the IndexWriter go? Is there any alternative?
   
   Many people abused the method because it was poorly named. Its purpose (when used correctly)
is to rewrite an index to a smaller number of segments. However, many people called it with
no arguments immediately after creating their index, which *rewrites* the entire index that
was just written to a single segment.
   
   The method has been renamed to `ForceMerge()` to clarify what it does and prevent it from
being irresistible to call when it is not appropriate to.
   
   [Simon says: optimize is bad for you….](https://blog.trifork.com/2011/11/21/simon-says-optimize-is-bad-for-you/)


----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message