-
Notifications
You must be signed in to change notification settings - Fork 7
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
Update lucene to version 8.11.2 #16
Conversation
…queries, search as before
I think "a" is not a stop word in this context, because it is a verb here. But my French is not that good.
I don't speak all of these languages, so I sometimes just changed the test to reflect the output. At least that should prevent regression.
So summarizing @JJK96 , I would like that we try to:
(related to discussion started here: #15 (comment)) |
Also removed LuceneAnalyzer and moved it's functionality into AnalyzerFactory AnalyzerFactory now returns a real subclass of Analyzer, instead of a wrapper. For all languages, language-specific analyzers are used, instead of Snowball Analyzers
Removed EnglishAnalyzer test in AnalyzerFactoryTest
|
…ries would always search the whole bible.
Added check for index version when getting index status. This ensures that the status correctly represents if the index is invalid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments.
Will fix most of them myself in an upcoming commit.
notes.md
Outdated
@@ -0,0 +1,18 @@ | |||
Functionality AbstractBookAnalyzer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file should be deleted before merging, right?
@@ -44,6 +44,7 @@ public interface Index { | |||
* @throws BookException | |||
*/ | |||
Key find(String query) throws BookException; | |||
Key find(String query, boolean full_text) throws BookException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Key find(String query, boolean full_text) throws BookException; | |
Key find(String query, boolean fullText) throws BookException; |
Field headingField = new Field(FIELD_HEADING, "", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.NO); | ||
Field headingStemField = new Field(FIELD_HEADING_STEM, "", Field.Store.NO, Field.Index.ANALYZED, Field.TermVector.NO); | ||
Field morphologyField = new Field(FIELD_MORPHOLOGY , "", Field.Store.NO, Field.Index.ANALYZED, Field.TermVector.NO); | ||
FieldType stored_not_analyzed = new FieldType(StringField.TYPE_STORED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
camelCaps
return createAnalyzer(book, false); | ||
} | ||
|
||
public Analyzer createAnalyzer(Book book, Boolean stopwording) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stopWording
analyzerPerField.put(LuceneIndex.FIELD_INTRO_STEM, analyzer); | ||
analyzerPerField.put(LuceneIndex.FIELD_HEADING_STEM, analyzer); | ||
//analyzerPerField.put(LuceneIndex.FIELD_HEADING, myNaturalLanguageAnalyzer); //heading to use same analyzer as BODY | ||
//analyzerPerField.put(LuceneIndex.FIELD_INTRO, myNaturalLanguageAnalyzer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary comments?
Latest.Index.Version=1.2 | ||
Lucene.Version=3.0 | ||
|
||
Latest.Index.Version=1.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add comment above (as there seem to be version history)
I'll merge these both to develop and start preparing a beta release. Looks good so far, but haven't tested yet in practice. |
Replaces #15
This gave access to some new features in Lucene, such as Regular Expression search. This is a major refactor because I updated Lucene 5 major versions.
I tested several languages, English, Czech, Chinese, Japanese, Thai and search works in these languages. I am not capable to test if the stemming is good for all languages, so some more testing by native speakers is necessary.