I assume the use of filters as a solution to hide part of the code. Just like it is in JPA in native query. One part is useful for better code organization. Not useful to others at all, it can be replaced when creating queries. But whether or not something can be replaced by another method should be the responsibility of the user. For me, just such a system is necessary. I have to design each application and prepare a set of tools. That the team that is to perform the task and maintain the code was as simple as possible. They didn't understand how the equipment used by me worked. They just have to specifically address the primary purpose of the project, not really getting into the way hiternate-search or apache lucene work. So the proposed task only has a cosmetic impact on the code. But very important in the later use of your library in team work. |