Skip to content

Why is Lucene sometimes not matching InChIKeys?

I have indexed my database using Hibernate Search. I use a custom analyzer, both for indexing and for querying. I have a field called inchikey that should not get tokenized. Example values are: BBBAWACESCACAP-UHFFFAOYSA-N KEZLDSPIRVZOKZ-AUWJEWJLSA-N When I look into my index with Luke I can confirm that they …

How do I set an empty list of a certain type

We have Collections.EMPTY_LIST but it is not typed, which shows an eclipse warning. How do I set an empty list of a certain type. Answer Try this See this also Type-safe, generic, empty Collections with static generics

Protected in Interfaces

Why are all methods in an interface definition implicitly public? Why does it not allow a protected method?

What’s the advantage of load() vs get() in Hibernate?

Can anyone tell me what’s the advantage of load() vs get() in Hibernate? Answer Whats the advantage of load() vs get() in Hibernate? load() get() Only use load() method if you are sure that the object exists. If you are not sure that the object exist, then use one of get() methods. load() method will th…