Okay, most Queries (maybe all of them) listed in https://lucene.apache.org/core/4_3_0/core/org/apache/lucene/search/Query.html should be fine.
But by this "serialization" we will be reliant on the Lucene team not changing the public API of these query types. But for most Query-Types in this should't be a problem.
Another thing that we should think about is whether the behaviour of these Queries is "stable". What do we do if the behaviour of one of these classes changes when we update to a new Lucene version?
I think we will definitely have to put an extra level of security in the backend. We should serialize the version of Lucene used into our transmitted object and create a layer in the backend that can provide different behaviour for different versions. In fact, this is one of the reasons I introduced my CustomBehaviour class.
example follows {/code}
|