-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with Null values in Spatial index after Migration from V2.1.8 to V2.2.13 #7014
Closed
1 of 5 tasks
Labels
Comments
the right syntax for ignoring null values is create index test.ll on test (latitude,longitude) SPATIAL ENGINE LUCENE METADATA {ignoreNullValues: true} |
@maggiolo00 I've change my code the problem seems to be solved. Thanks |
do you have a test case that fails with |
... it seems to work now .. |
did you solve it? Can i close this? Thanks |
Yes you can close thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OrientDB Version, operating system, or hardware.
Operating System
Expected behavior and actual behavior
see below
Steps to reproduce the problem
Create a spatial Index
db.command(new OCommandSQL("create index test.ll on test (latitude,longitude) SPATIAL ENGINE LUCENE )).execute();
Insert a document with null for latitude and longitude
In orientDB V2.1.8 it worked fine
After migration to orientDb 2.2.13 the following exception occurs:
(I've also already tried:
create index test.ll on test (latitude,longitude) SPATIAL ENGINE LUCENE {ignoreNullValues: true}
create index test.ll on test (latitude,longitude) SPATIAL ENGINE LUCENE {ignoreNullValues: false}
)
EXCEP@ ============================================================
EXCEP@ Exception at: 2016-12-16 16:03:12
EXCEP@ Msg:
EXCEP@ Error during saving of record with rid #25:0
DB name="db.2.1.5"
EXCEP@ ------------------------------------------------------------
EXCEP@ com.orientechnologies.orient.core.exception.ODatabaseException: Error during saving of record with rid #25:0
EXCEP@ DB name="db.2.1.5"
EXCEP@ at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:197)
EXCEP@ at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2623)
EXCEP@ at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2507)
EXCEP@ at de.contecon.picapport.db.Photo.saveToDocument(Photo.java:214)
EXCEP@ at de.contecon.picapport.db.Photo.save(Photo.java:163)
EXCEP@ at de.contecon.picapport.db.DbWrapper.insertPhoto(DbWrapper.java:315)
EXCEP@ at de.contecon.picapport.db.DbWrapper.updatePhoto(DbWrapper.java:291)
EXCEP@ at de.contecon.picapport.db.DbWrapper.updatePhoto(DbWrapper.java:267)
EXCEP@ at de.contecon.picapport.TestPicApportDBService.testCreateAndImportPhoto(TestPicApportDBService.java:142)
EXCEP@ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
EXCEP@ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
EXCEP@ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
EXCEP@ at java.lang.reflect.Method.invoke(Method.java:601)
EXCEP@ at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
EXCEP@ at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
EXCEP@ at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
EXCEP@ at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
EXCEP@ at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
EXCEP@ at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
EXCEP@ at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
EXCEP@ at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
EXCEP@ at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
EXCEP@ at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
EXCEP@ at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
EXCEP@ at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
EXCEP@ at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
EXCEP@ at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
EXCEP@ at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
EXCEP@ at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
EXCEP@ at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
EXCEP@ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
EXCEP@ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
EXCEP@ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
EXCEP@ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
EXCEP@ Caused by: com.orientechnologies.orient.core.exception.OStorageException: Cannot put key value entry in index
EXCEP@ DB name="db.2.1.5"
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doUpdateIndexEntry(OAbstractPaginatedStorage.java:1879)
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.updateIndexEntry(OAbstractPaginatedStorage.java:1801)
EXCEP@ at com.orientechnologies.lucene.index.OLuceneIndexNotUnique.put(OLuceneIndexNotUnique.java:139)
EXCEP@ at com.orientechnologies.spatial.index.OLuceneSpatialIndex.put(OLuceneSpatialIndex.java:42)
EXCEP@ at com.orientechnologies.spatial.index.OLuceneSpatialIndex.put(OLuceneSpatialIndex.java:27)
EXCEP@ at com.orientechnologies.orient.core.index.OClassIndexManager.putInIndex(OClassIndexManager.java:659)
EXCEP@ at com.orientechnologies.orient.core.index.OClassIndexManager.addIndexEntry(OClassIndexManager.java:554)
EXCEP@ at com.orientechnologies.orient.core.index.OClassIndexManager.addIndexesEntries(OClassIndexManager.java:541)
EXCEP@ at com.orientechnologies.orient.core.index.OClassIndexManager.onRecordAfterCreate(OClassIndexManager.java:419)
EXCEP@ at com.orientechnologies.orient.core.hook.ODocumentHookAbstract.onTrigger(ODocumentHookAbstract.java:221)
EXCEP@ at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.callbackHooks(ODatabaseDocumentTx.java:1138)
EXCEP@ at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.callbackHookSuccess(ODatabaseDocumentTx.java:3134)
EXCEP@ at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:2136)
EXCEP@ at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveNew(OTransactionNoTx.java:235)
EXCEP@ at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:168)
EXCEP@ ... 33 more
EXCEP@ Caused by: java.lang.NullPointerException
EXCEP@ at org.apache.lucene.spatial.query.SpatialArgs.calcDistanceFromErrPct(SpatialArgs.java:64)
EXCEP@ at org.apache.lucene.spatial.prefix.PrefixTreeStrategy.createIndexableFields(PrefixTreeStrategy.java:137)
EXCEP@ at com.orientechnologies.spatial.engine.OLuceneSpatialIndexEngineAbstract.newGeoDocument(OLuceneSpatialIndexEngineAbstract.java:154)
EXCEP@ at com.orientechnologies.spatial.engine.OLuceneLegacySpatialIndexEngine.put(OLuceneLegacySpatialIndexEngine.java:161)
EXCEP@ at com.orientechnologies.spatial.engine.OLuceneSpatialIndexEngineDelegate.put(OLuceneSpatialIndexEngineDelegate.java:143)
EXCEP@ at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doUpdateIndexEntry(OAbstractPaginatedStorage.java:1873)
EXCEP@ ... 47 more
The text was updated successfully, but these errors were encountered: