Questions tagged [cqengine]

CQEngine – Collection Query Engine – is a NoSQL indexing and query engine, for retrieving objects matching SQL-like queries from Java collections

CQEngine – Collection Query Engine – Ultra-fast SQL-like queries on Java collections.

27 questions
9
votes
1 answer

CQEngine Optimize for Small DataSets

I have an application which needs to apply flexible queries against millions of smaller collections ranging in size from 10 to 10000 items per collection. CQEngine is working great in terms of providing the flexibility to query these collections…
Nath5
  • 1,665
  • 5
  • 28
  • 46
5
votes
4 answers

How to get first or last item from cqengine IndexedCollection with NavigableIndex

I have com.googlecode.cqengine.IndexedCollection object with NavigableIndex configured. I need to get first or last item from the index or iterator of the index in general. I suppose this should be trivial. I know I can create Query object with…
Pavel Niedoba
  • 1,554
  • 2
  • 19
  • 36
4
votes
1 answer

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

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…
JohnDoDo
  • 4,720
  • 8
  • 31
  • 47
3
votes
1 answer

How to correctly index where conditions of a query?

I have the following pojo which maps a db row entry: public class Pojo{ //key private String a; private String b; private String c; //other columns private String d; private String e; private String f; //defining attributes on…
Phate
  • 6,066
  • 15
  • 73
  • 138
3
votes
1 answer

Generic method restriction circumvention in a 3rd party library

I use cqengine for collection indexation: Attribute startDateAttr = new SimpleAttribute() { @Override public LocalDate getValue(UtilizationEntry object, QueryOptions queryOptions) { …
injecto
  • 829
  • 1
  • 10
  • 23
2
votes
1 answer

cqengine cant index by equals

I'm trying to add an index where my override equals() determines if two objects are the same or not. Car.java public static class Car { final String id; private String name; public Car(String id, String name) { …
Hooli
  • 1,135
  • 3
  • 19
  • 46
2
votes
1 answer

CQEngine In Clause with MultiValueNullableAttribute

I have a class Object1 which has a list of longs called tags. I have another list of longs called tagsToSearch. How can I construct a query using CQEngine that is the following: Select * from Object1 Where tags in (tagsToSearch) If anyone knows…
Nath5
  • 1,665
  • 5
  • 28
  • 46
2
votes
1 answer

Can CQEngine query an object inside another object

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
Charles Bryant
  • 995
  • 2
  • 18
  • 30
2
votes
1 answer

cqengine: is the maven dependency on sqllite necessary?

I am using cqengine with no particular setting and I have a 6MB maven dependency on sqllite. I currently just use NavigableIndexes, so I am not writing anything on my disk, not explicitely that is, however I'm managing very big lists. My question…
Phate
  • 6,066
  • 15
  • 73
  • 138
1
vote
1 answer

SQL like expression for nested obejct

I've nested POJO like below: class Parent{ String name; Child child; } class Child{ String name; } What would be the sql-like query to match child by name ? So far I have this : CQNParser parser =…
Alexander.Furer
  • 1,817
  • 1
  • 16
  • 24
1
vote
1 answer

CQEngine + large result set: sort or group by multiple attributes performance

I have a fairly large collection (~10MM elements), and I need to run queries that return fairly large result sets (~500K elements). I need those elements grouped by or ordered based on two attributes: The first attribute (let's call it A) has about…
Al A
  • 175
  • 2
  • 15
1
vote
0 answers

Query large CQEngine ResultSet multiple times

I have the following use case of a real-time app using CQEngine: Query a large (10M+ element) collection for a given criteria (let's say criteria A), which would match a substantial amount of the collection, approx. 5K-100K Do multiple (10+)…
bugfoot
  • 667
  • 7
  • 20
1
vote
1 answer

cqengine join more than two collections

Say I have 3 collections: User User_Role Role I want to know a user by given role name but I need to join user_role on user.id and user_role on role.id to establish the user. Currently all the samples only demonstrate how to do a join with two…
Hooli
  • 1,135
  • 3
  • 19
  • 46
1
vote
1 answer

cqengine compare by datetime

I'm trying to find a list of objects that are after a certain DateTime. In order to do so, I've created the following query: return foos.retrieve(QueryFactory.equal(EXPIRY_INDEX, new DateTime())); I then created the following index: public static…
Hooli
  • 1,135
  • 3
  • 19
  • 46
1
vote
0 answers

Cq engine persistent map giving exception "Caused by: java.sql.SQLException: database is locked"

I am trying to store my Java Cq engine map on disk. The map is huge and multiple threads are accessing it concurrently. I am getting: Caused by: java.sql.SQLException: database is locked I am doing this to remove clear my heap space.…
akash tripathi
  • 29
  • 1
  • 1
  • 3
1
2