But an NPE is not acceptable [...] we should be rather lenient in the data expectations.
I gather you want us to return an EntityInfo with a null ID, and only throw an exception on the -orm side if we try to retrieve the associated entity? So that you can safely execute queries on documents without IDs, as long as you don't want to use the ID? Looks good to me, I'll do this if possible.
Also we should be prepared to face situations in which people deploy multiple Hibernate Search powered applications targeting the same ES cluster; these independent applications might need to evolve independently, e.g. not to force them all to use the same Hibernate Search version.
Having multiple application rely on the same ES cluster seems a reasonable expectation, but multiple applications using different Hibernate Search versions... Well, in my opinion, that's asking for trouble. Even if we do try to make things easy, there will be different bugs, and it might easily end up as an integration nightmare. Anyway... We can try to be cautious about that, I guess. Not sure if this requires extra caution though, since we already don't want to break schemas between two micros, maybe even minors. |