Comments (9)
Hi @fppt
Since v.2.2 unique indexes also consider null values. You can disable this setting when you create the index setting ignoreNullValues=true, see http://orientdb.com/docs/2.2.x/SQL-Create-Index.html
Anyway, I suggest you not to use it, because indexes without null values cannot be used for some query optimizations, so you will lose performance in some corner cases
Thanks
Luigi
from orientdb-gremlin.
I just checked that docs page, it contains some outdated info. In v 2.2 null values are NOT ignored by default.
I'm fixing it now
Thanks
Luigi
from orientdb-gremlin.
Thanks @luigidellaquila. For the time being is there a way to disable indexing nulls using the available API of this plugin?
from orientdb-gremlin.
How are you creating the index? Is it a single key index?
Thanks
Luigi
from orientdb-gremlin.
I create it as follows:
BaseConfiguration indexConfig = new BaseConfiguration();
indexConfig.setProperty("keytype", OType.String);
indexConfig.setProperty("type", "UNIQUE");
graph.createVertexIndex("prop1", "label1", indexConfig);
from orientdb-gremlin.
I think this should be enough:
BaseConfiguration indexConfig = new BaseConfiguration();
indexConfig.setProperty("keytype", OType.String);
indexConfig.setProperty("type", "UNIQUE");
indexConfig.setProperty("metadata.ignoreNullValues", true);
graph.createVertexIndex("prop1", "label1", indexConfig);
Thanks
Luigi
from orientdb-gremlin.
I added indexConfig.setProperty("metadata.ignoreNullValues", true);
no joy sadly. Still getting the same exception.
from orientdb-gremlin.
@luigidellaquila : Can you expand on your statement to not use "unique, ignored-nulls" indexes because of optimization issues in some edge cases? It's something we're doing quite a bit of (in cases where a property is often the same for 99% of the documents, but we need to quickly find the other 1%). I haven't seen any roblems, but I'd like to understand what to watch out for.
from orientdb-gremlin.
Hi @Eric24
The query execution planner used to skip index usages in some conditions, when the index was configured to exclude null values. Anyway, in v 3.0 and with the new execution planner we solved this problem, so it's not a concern anymore
Thanks
Luigi
from orientdb-gremlin.
Related Issues (20)
- Upgrade to TinkerPop 3.4.x for ODB 3.1.x
- How to get vertex class name with gremlin console? HOT 1
- Groovy version conflect with gremlin server HOT 2
- gremlin-python tutorial test_000.py fails
- Queries with two or more parameters don't work. HOT 7
- Inconsistent transaction beheviour w/remote: HOT 2
- Cannot create property-index on graph loaded via gremlin API HOT 2
- java.lang.IllegalArgumentException: rawElement must not be null! HOT 12
- Maven Group ID in pom.xml is not the official one? HOT 3
- First run problems on OSX (3.1.0) HOT 14
- gremlin traversalsource io step not supported
- gremlin.sh exits immediately
- java.lang.NegativeArraySizeException on g.V().drop()
- error on installing orientdb plugin into gremlin console HOT 1
- How to use GraphComputer with gremlinpython or java api to make some computation like pageRank algorithme ?
- [rl-vulnerability_alerts-1] Violation against OSS Rules of Play HOT 1
- [rl-reuse_tool-2] Violation against OSS Rules of Play HOT 1
- [rl-reuse_tool-1] Violation against OSS Rules of Play HOT 1
- [rl-reuse_tool-3] Violation against OSS Rules of Play HOT 1
- [rl-reuse_tool-4] Violation against OSS Rules of Play HOT 1
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 orientdb-gremlin.