-
Notifications
You must be signed in to change notification settings - Fork 238
WIP: Lucene update #1113
WIP: Lucene update #1113
Conversation
On my clone server it has already been updated to 7.7.1 and is used by some Japanese people. (Because of the long Japanese language processing, I was forced to change the class structure for unit testing. Due to Lucene's destructive updates, there are some syntactic differences. BooleanQuery.Builder subMusicFoldersQuery = new BooleanQuery.Builder();
musicFolders.forEach(musicFolder -> {
if (indexType == IndexType.ALBUM_ID3 || indexType == IndexType.ARTIST_ID3) {
subMusicFoldersQuery.add(new TermQuery(new Term(FieldNames.FOLDER_ID, musicFolder.getId().toString())), Occur.SHOULD);
} else {
subMusicFoldersQuery.add(new TermQuery(new Term(FieldNames.FOLDER, musicFolder.getPath().getPath())), Occur.SHOULD);
}
});
mainQuery.add(subMusicFoldersQuery.build(), Occur.MUST); null is no longer allowed. if (!(isEmpty(criteria.getFromYear()) && isEmpty(criteria.getToYear()))) {
query.add(IntPoint.newRangeQuery(FieldNames.YEAR,
isEmpty(criteria.getFromYear())
? Integer.MIN_VALUE
: criteria.getFromYear(),
isEmpty(criteria.getToYear())
? Integer.MAX_VALUE :
criteria.getToYear()),
Occur.MUST);
} Also, the field types used in this PR document definition may be different from mine. Migration is possible. |
This is a bit off-topic, but why aren't you trying to upstream more of your changes in airsonic? |
I apologize if I am a guilty. It often seems that Lucene's topic has risen but it has always been negative. |
I, for one, welcome better support for complex scripts, it's currently a bit painful to search for Japanese stuff... I'd be glad to test and include this if you can make a PR! :) |
Me too ! |
I also think that way.
What about this? I suggest.
It is the state now. Although generational changes seem irrelevant, it reduce the burden on users at the time of release. I found this link in past issues. I do not want the Airsonic to be complicated at all, and Multilingual support is an example of an anti-pattern for a specific purpose. It is sad, the latest version of Subsonic has evolved so cleverly that it is impossible to search Japanese... |
Splitting the file is a good start, I do agree :) |
I will create a PR from now on as a suggestion. I mainly use JapaneseAnalyzer. It is because UAX#29 was introduced. |
If I understand it correctly, if we start using |
That's right but, my clone contains minor spec changes as well as Lucene updates and localization. I will create a minimum of PR in accordance with the Guidelines for Contributing.
Other than that, I think that judgment is necessary individually. |
This PR is heavily based on #847, some might even call it a complete rip-off.