-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Upgrade to Lucene 4.10 #7584
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
Upgrade to Lucene 4.10 #7584
Conversation
Note: src/main/java/org/elasticsearch/action/termvector/TermVectorFields.java is still unresolved Conflicts: src/main/java/org/elasticsearch/action/termvector/TermVectorFields.java src/main/java/org/elasticsearch/common/xcontent/json/JsonXContentParser.java src/main/java/org/elasticsearch/index/fielddata/FieldData.java src/main/java/org/elasticsearch/search/facet/terms/strings/HashedScriptAggregator.java src/main/java/org/elasticsearch/search/facet/terms/strings/TermsStringOrdinalsFacetExecutor.java src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java
LGTM |
left some comments |
LGTM |
I made the merge policy changes, but I have not added a test. There are no existing tests, but there really should be one for each provider checking that the settings can actually be set, and updated. I'll work on these separately, though, unless someone feels it is important to block the upgrade on adding these tests. |
looks good |
@rjernst what about the NamedAnalyzer? I think it should use the same strategy as the analyzer it wraps, no? |
I am sure I made the NamedAnalyzer commit. I just followed Uwe's approach for PerFieldAnalyzerWrapper: this strategy is in fact not used, except as a fallback in the case you wrap namedanalyzer in yet another wrapper (such as shingles) that isnt a pure delegator. So its just "safety", but maybe there is a way we could just have an error if we do such a thing instead of increased memory usage? Personally I still would prefer if delegation and wrapping use-cases were totally separate and type-safe, but my head is still recovering from looking at this stuff the last time. |
@rmuir yea, I think that in practice, it doesn't matter in the context of NamedAnalyzer, since its just a wrapper. I just think in practice, its cleaner, since NamedAnalyzer is just a delegate, and thats it, not similar to PerfieldAanalyzerWrapper, because of it, I think its cleaner (in the scope of just the NamedAnalyzer impl) to use the same reuse strategy as the analyzer it wraps. |
Right i think the potential for a bug only happens if:
The confusing thing is the API for this "strategy" its passing, again if elasticsearch isn't doing crazy things (and i think its not), then this strategy is never really used:
I guess my suggestion is whether we should force an error in such a "fallback" case, one evil way is to pass ThrowsExceptionOnEveryOperationReuseStrategy instead. There might be cleaner ways. |
I am up for |
I think those are the 3 choices we have today (since unfortunately we dont have great type safety):
Personally I am for option 3 as well. I will try to think of a cleaner way. |
What is left to do here? |
LGTM |
Closes #7584 Conflicts: src/main/java/org/apache/lucene/search/suggest/analyzing/XAnalyzingSuggester.java src/main/java/org/elasticsearch/search/suggest/completion/Completion090PostingsFormat.java src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggester.java
No description provided.