cqengine

What is the indexing penalty in CQEngine for a fast changing collection?

假如想象 提交于 2019-12-23 16:02:55
问题 I'm considering CQEngine for a project where I need to handle lots of real time events and execute some queries from time to time. It works well for returning the results but I noticed that the larger the collection gets the slower it becomes to add or remove elements to/from it. I have a few simple indexes added on the collection so I'm assuming the delay is because on each event added/removed the indexes are updated. I also get an OutOfMemoryError on large numbers of events, from the

Can CQEngine query an object inside another object

核能气质少年 提交于 2019-12-11 05:28:30
问题 Does anyone know if CQEngine can query objects with in other objects? I would like to be able to query users, orders and products. Can this be done with CQEngine or would I need to flatten the objects? public class User { public List<Orders> orders; } public class Orders { public List<Products> products; } public class Products { public String name; } 回答1: Yes, you just need to define a CQEngine attribute which will return the values from the nested objects you want to search . For example,