Skip to content
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-5.2.0-snapshot-1673124. #10562

Merged
merged 2 commits into from Apr 14, 2015

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Apr 13, 2015

No description provided.

@mikemccand
Copy link
Contributor

LGTM, I like the added checks in AllTermSpanScorer.

@@ -51,7 +51,7 @@ public AllTermQuery(Term term) {
}

@Override
public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class overrides weight/scorer, where is its positions check (throw IAE if proximity is not enabled) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to fix it in Lucene too then

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you are a bit behind. I added tests for this position check last night and fixed bugs in the default impl.

@rmuir
Copy link
Contributor

rmuir commented Apr 13, 2015

I actually disagree with mike. Paul went the route of adding these asserts to every single spans, and yet they could still not be debugged.

Problem is: when trying to duplicate checks like this across N classes then its inevitable that some will be incomplete. you are also bound to have some buggy asserts (false fails) and it also makes it really hard to read the code.

So I think the asserts should be removed (from lucene too). I opened https://issues.apache.org/jira/browse/LUCENE-6411 yesterday and worked on it all day long to fix the root cause.

@jpountz
Copy link
Contributor Author

jpountz commented Apr 13, 2015

While I do agree that AssertingSpans is a better way to find bugs, all that this patch does is aligning AllTermQuery with SpanTermQuery from which it is derived. I can push a new update once LUCENE-6411 is done.

@rmuir
Copy link
Contributor

rmuir commented Apr 13, 2015

LUCENE-6411 is already done. Please don't add these redundant asserts. it just causes me more work to remove them.

@jpountz
Copy link
Contributor Author

jpountz commented Apr 13, 2015

I can remove them but then you might want to remove them from SpanScorer.setFreqCurrentDoc too.

@rmuir
Copy link
Contributor

rmuir commented Apr 13, 2015

The only reason they are still there is because i needed to get some amount of sleep last night. It is work to cleanup all this stuff.

@rmuir
Copy link
Contributor

rmuir commented Apr 13, 2015

See my commit, i cleaned up this query: it doesn't manipulate Spans anymore.

@jpountz
Copy link
Contributor Author

jpountz commented Apr 14, 2015

Thanks @rmuir !

jpountz added a commit that referenced this pull request Apr 14, 2015
…1673124

Upgrade to lucene-5.2.0-snapshot-1673124.
@jpountz jpountz merged commit 22720a1 into elastic:master Apr 14, 2015
@jpountz jpountz removed the review label Apr 14, 2015
@clintongormley clintongormley added :Core/Infra/Core Core issues without another label and removed >enhancement labels Aug 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >upgrade v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants