Comments (4)
Done, included in CQEngine 1.0.3.
I made some minor changes to the patch:
- If an object is added to the IndexedCollection and it already exists in UniqueIndex, UniqueIndex will not throw an exception if the condition newObject.equals(existingObject) is true. This change brings UniqueIndex in line with the behaviour of other indexes (which safely can be notified multiple times about the same object), to avoid the need to add special logic for UniqueIndex in IndexedCollection
- I added support for MultiValueAttribute. Attribute values become the keys in the index, so there is no problem per-se in an object having a multiple values for an attribute. The object will be added to the index multiple times, against one key for each of its attribute values.
Multi-valued attributes can be used with unique index, as long as there is no
overlap in values between objects. For example Car{features=radio,cd_player}
and Car{features=sunroof,spare_tyre} can both be added to a UniqueIndex. But a
third Car{features=alarm,sunroof} would cause an exception because there would
already be an entry for sunroof. This is a contrived example, but some
applications might have fields which contain multiple but naturally disjoint
values, for example foreign key-type references, like
Customer{List<CustomerOrder>}.
This will be a great addition so thanks again to Kinz Liu.
Original comment by [email protected]
on 7 Dec 2012 at 10:46
- Changed state: Done
from cqengine.
I updated the benchmark page: http://code.google.com/p/cqengine/wiki/Benchmark
UniqueIndex is *significantly* faster:
3600% faster than HashIndex at indexing unique attributes
30% faster than HashIndex in query performance
Actual figures are here: http://cqengine.googlecode.com/svn/wiki/documents/
Original comment by [email protected]
on 8 Dec 2012 at 12:02
from cqengine.
I see the above patch missing in IndexedCollectionImpl.java in the latest
release 1.2.1. Any reason this was not included in the release?
Original comment by [email protected]
on 8 Oct 2013 at 9:31
from cqengine.
No features were removed AFAIK. UniqueIndex is still there (it's a core
feature).
IndexedCollectionImpl no longer exists however. In version 1.1.0 it was renamed
to ConcurrentIndexedCollection, because an additional implementation
ObjectLockingIndexedCollection was also added.
What was in IndexedCollectionImpl.java is now in
ConcurrentIndexedCollection.java, so see that class instead. Let me know if you
don't find what you are looking for!
Original comment by [email protected]
on 8 Oct 2013 at 9:59
from cqengine.
Related Issues (20)
- FilteringIterator returns hasNext as true after the collection is consumed HOT 1
- Update data automatically HOT 1
- Pagination Over data HOT 4
- Perfomance index HOT 3
- Consider exposing utility static method taking collections
- Reenable cached hashCode
- Support for java.util.Optional
- [Question] How does CQEngine pick the appropriate index to query?
- most longest prefix value exist in the column value but it doesn't intersect with other columns values in the query that we need part of query retrieval HOT 7
- Support STRICT_REPLACEMENT in ObjectLockingIndexedCollection/ConcurrentIndexedCollection
- TransactionalIndexedCollection support for UniqueIndex is broken
- Support for attribute accessors for Java record type HOT 1
- Kryo generates InaccessibleObjectException - Make Dependencies "Java 17 compatible"
- Bug in AttributeOrdersComparator HOT 5
- Offheap cache visibility HOT 1
- Support for ANTLR 4.10.1 HOT 12
- Does it support SQL statistics queries HOT 3
- Thread blocked when using Materialized View Sort For the Longest Prefix for CSV that contain more than 11 K rows HOT 3
- Error while parsing SQL NOT LIKE query HOT 1
- Error while parsing SQL LIKE '%%%' query
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cqengine.