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

Correct this '&' to '&&' #673

Closed
nikcio opened this issue Oct 15, 2022 · 3 comments · Fixed by #689
Closed

Correct this '&' to '&&' #673

nikcio opened this issue Oct 15, 2022 · 3 comments · Fixed by #689
Assignees
Labels
good-first-issue Good for newcomers hacktoberfest-accepted is:enhancement New feature or request

Comments

@nikcio
Copy link
Contributor

nikcio commented Oct 15, 2022

Mentioned in #648

Issues found: https://sonarcloud.io/project/issues?resolved=false&rules=csharpsquid%3AS2178&id=nikcio_lucenenet

Check the Lucene 4.8.1 source on this to see whether this is a translation bug or a bug carried over from Lucene, and report appropriately.

  1. If this is a bug in the translation from Java to .NET, we should simply fix it.
  2. If this is a bug that still exists in the current version of Lucene, we should both fix it and report it to them.
  3. If this is a bug that existed in 4.8.1 but was fixed since, we need to track down the JIRA/GitHub issue number and leave a comment indicating the issue number of the patch that has been applied. The entire patch should be analyzed and we should bring over all changes from the patch. We should also look up and include the Lucene version number(s) it was released in so we know when to remove the comment.
@NightOwl888 NightOwl888 added up-for-grabs This issue is open to be worked on by anyone good-first-issue Good for newcomers is:enhancement New feature or request hacktoberfest-accepted labels Oct 15, 2022
@nikcio
Copy link
Contributor Author

nikcio commented Oct 16, 2022

I'll look into this one 😄

@nikcio
Copy link
Contributor Author

nikcio commented Oct 16, 2022

I've tracked down this commit in the Lucene repository: apache/lucene@55594ba#diff-ccf964ce5c3d619df7e73dd7c1467cd88265240d7bdc1c35c27bfc02d669d6c8

It seems the file was deleted and I haven't been able to find it in versions 5.0.0 and above. I can see that the single '&' was still in the 4.10.4 version: https://github.com/apache/lucene/blob/69175ad4fe8d224ad6a348d05f686105999a92e8/lucene/analysis/common/src/java/org/apache/lucene/analysis/nl/DutchStemmer.java#L193

So it might just be to fix the issue.

@NightOwl888 NightOwl888 assigned NightOwl888 and nikcio and unassigned NightOwl888 Oct 16, 2022
@NightOwl888 NightOwl888 removed the up-for-grabs This issue is open to be worked on by anyone label Oct 16, 2022
@NightOwl888
Copy link
Contributor

Well, being that it doesn't make any sense to use a bitwise & operator here, it makes sense just to change it.

Looks like the current version is using the snowball stemmer: https://github.com/apache/lucene/blob/cc342ea7407c729a743123d8f7957aff6c6f9792/lucene/analysis/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java. Snowball is poached from: https://github.com/weavejester/snowball-stemmer. The Snowball DutchStemmer exists in 4.8.0, but apparently, they hadn't gotten around to upgrading it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Good for newcomers hacktoberfest-accepted is:enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants