-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NRE on migration from 1.4 -> 1.5 due to Lucene changes #12831
Conversation
Could you change this also in the 2 other places where I did the same.
|
src/OrchardCore.Modules/OrchardCore.Search.Lucene/Migrations.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Search.Lucene/Migrations.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Search.Lucene/Migrations.cs
Outdated
Show resolved
Hide resolved
Fix like JTKech suggestion
Ok, I think I got this. Basically, a field cannot be analyzed and a keyword at the same time. Included = keyword (Set when the option "Include this element in the index" was checked) Now, I believe that we had all the fields as "Keywords" by default which was the opposite of what ElasticSearch does. Also, it was not making any sense to have it set as a Keyword by default because most people will want these fields to be tokenized/analyzed by default because that's the goal of it ... You want to have only fewer specific fields to be set as Keyword for using them as technical values most of the time. Based on the fact that "Analyzed" is now the option when you check "Include this element in the index".
So we need to take into consideration that the "Analyzed" option is now "Included". We don't need to migrate the "Included" to a different value just set the new "Keyword" one based on which of these fields had only "Included" set on them. |
Lucene Search Migration from 1.4 to 1.5 fails due to null reference error.