lucenenet-dev mailing list archives

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

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


   @NightOwl888 maybe the new Github discussion feature should be enabled as it's more suitable
for things like this i guess :) ?
   
   Just to give a quick answer to two of them.
   
   > 1. Where did the `Optimize` method of the IndexWriter go? Is there any alternative?
   Even in 3.0.3 the general consensus was that you shouldn't call that method but instead
let Lucene handle optimizations internally. It generally knows better.
   
   > 2. 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?
   
   You can still specify store as an option, As for Analyzed, AFAIK.
   TextField => Analyzed
   StringField => Not Analyzed
   
   So you should use TextField in your case.
   ```
   new TextField(fullpath, transform(self.DeserializedValue), Field.Store.NO)
   ```
   
   The other two I will leave to @NightOwl888 , maybe he can also elaborate further.


----------------------------------------------------------------
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