Oriendb Lucene

1,107 views
Skip to first unread message

Enrico Risa

unread,
Apr 24, 2014, 12:14:14 PM4/24/14
to orient-...@googlegroups.com
Hi All,

a new module for OrientDB is available. The first integration OrientDB / Lucene is out.
The integration for now is focused on Full Text Index and Spatial Index. 

to install and use the module.

Give it a try,
contributions are welcome.

Best Regards
Enrico

 

ste...@activitystream.com

unread,
Apr 24, 2014, 5:27:08 PM4/24/14
to orient-...@googlegroups.com

thank you!

ste...@activitystream.com

unread,
Apr 24, 2014, 5:37:06 PM4/24/14
to orient-...@googlegroups.com
Hi,

Is there a Java API available to create those indexes?

Thank you again,
  -Stefán

Łukasz Twarogowski

unread,
Apr 25, 2014, 4:15:08 AM4/25/14
to orient-...@googlegroups.com
Haven't tried yet, but it sounds fantastic!
Thanks a lot!

Lukasz

Luca Garulli

unread,
Apr 25, 2014, 4:56:01 AM4/25/14
to orient-database
Hi Stefan,
The OrientDB Lucene module is perfectly integrated in OrientDB, so you can create indexes in the same exact way but passing "LUCENE" as engine.

Lvc@


--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Enrico Risa

unread,
Apr 25, 2014, 5:30:08 AM4/25/14
to orient-...@googlegroups.com
Hi Stefan,
i've updated the wiki, now you can find some example on how to create it with Java Api

Enrico

ste...@activitystream.com

unread,
Apr 25, 2014, 5:40:53 AM4/25/14
to orient-...@googlegroups.com, enric...@gmail.com

thank you both :)

Glenn Goodrich

unread,
Apr 25, 2014, 9:05:35 AM4/25/14
to orient-...@googlegroups.com
So, the wiki says to either grab a release from the releases page, and there aren't any, or to
mvn assembly:assembly

 which results in

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project lucene: Fatal error compiling: invalid target release: 1.7 -> [Help 1]

Any idea what I am doing wrong?  I'd love to start testing this ASAP.

Thanks,
Glenn

Enrico Risa

unread,
Apr 25, 2014, 9:15:15 AM4/25/14
to orient-...@googlegroups.com

Hi Glenn,
I will make a release as soon as i can, so you can start testing it.
For the assembly i will remove the target release 1.7. Meamwhile try to put 1.6 in the pom.xml

Enrico

Glenn Goodrich

unread,
Apr 25, 2014, 9:16:08 AM4/25/14
to orient-...@googlegroups.com
That'd be great.  FWIW, I am running 1.7 (rc1 in prod, rc2 in dev)

Thanks,
Glenn

Enrico Risa wrote:

Hi Glenn,
I will make a release as soon as i can, so you can start testing it.
For the assembly i will remove the target release 1.7. Meamwhile try
to put 1.6 in the pom.xml

Enrico

Il 25/apr/2014 15:05 "Glenn Goodrich" <gl...@goodrichs.net
<mailto:gl...@goodrichs.net>> ha scritto:


    So, the wiki says to either grab a release from the releases page,
    and there aren't any, or to
    ||
    mvn assembly:assembly

     which results in

    ||
    Failedto execute goal

    org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
    (default-compile)on project lucene:Fatalerror compiling:invalid
    target release:1.7->[Help1]

    Any idea what I am doing wrong?  I'd love to start testing this ASAP.

    Thanks,
    Glenn

    On Thursday, April 24, 2014 12:14:14 PM UTC-4, Enrico Risa wrote:

        Hi All,

        a new module for OrientDB is available. The first integration
        OrientDB / Lucene is out.
        The integration for now is focused on Full Text Index and
        Spatial Index.

        You can find the Docs here

        <https://github.com/orientechnologies/orientdb-lucene/wiki> on how
        to install and use the module.

        Give it a try,
        contributions are welcome.

        Best Regards
        Enrico


    --

    ---
    You received this message because you are subscribed to the Google
    Groups "OrientDB" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to orient-databa...@googlegroups.com

    For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to a topic in the
Google Groups "OrientDB" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/orient-database/hYneKg4_Gw4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
orient-databa...@googlegroups.com
<mailto:orient-databa...@googlegroups.com>.

Luca Garulli

unread,
Apr 26, 2014, 7:24:05 AM4/26/14
to orient-database
Hi all,
Starting from v 1.7 (soon) the Lucene module will always be part of OrientDB Community distribution.

Lvc@


To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.

ste...@activitystream.com

unread,
Apr 26, 2014, 8:06:40 AM4/26/14
to orient-...@googlegroups.com

good call! thank you :)
    For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to a topic in the
Google Groups "OrientDB" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/orient-database/hYneKg4_Gw4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
orient-databa...@googlegroups.com

For more options, visit https://groups.google.com/d/optout.

Carlo Pradissitto

unread,
Apr 28, 2014, 5:53:41 AM4/28/14
to orient-...@googlegroups.com
Hi Enrico,
is it possible to configure this module in order to have the lucene indexes in a dedicated directory?

thanks

Enrico Risa

unread,
Apr 28, 2014, 6:04:09 AM4/28/14
to orient-...@googlegroups.com
Hi Carlo,

for now it is not possible. The folder used is the db folder.
But you could open an issue for this request here .




Enrico


Luca Garulli

unread,
Apr 28, 2014, 6:57:24 AM4/28/14
to orient-database
Hi Carlo,
you could:
  1. create the lucene indexes,
  2. stop OrientDB
  3. move the lucene directory somewhere
  4. create a symbolic link that point to it
  5. restart OrientDB
This works as workaround waiting for an additional setting to pass.

Lvc@

Riccardo Tasso

unread,
Apr 28, 2014, 7:19:10 AM4/28/14
to orient-...@googlegroups.com

2014-04-26 13:24 GMT+02:00 Luca Garulli <l.ga...@gmail.com>:
Hi all,
Starting from v 1.7 (soon) the Lucene module will always be part of OrientDB Community distribution.

Hi Luca and Enrico,
   my application uses Orient 1.7.rc2 in embedded mode and a old version of lucene (3.0.2) for legacy reasons. Do you think there will be a conflict between lucene 3 and 4, passing to Orient 1.7? There is some way to disable the lucene indexing engine?

Cheers,
   Riccardo

Carlo Pradissitto

unread,
Apr 28, 2014, 7:21:23 AM4/28/14
to orient-...@googlegroups.com
already done ;-)

thanks!

Luca Garulli

unread,
Apr 28, 2014, 7:39:49 AM4/28/14
to orient-database
Hi Riccardo,
I really don't know, maybe you can try if works both together.

Lvc@



--

Stefano Migliucci

unread,
Apr 28, 2014, 9:24:04 AM4/28/14
to orient-...@googlegroups.com
Hi all,
I have a fresh installed orientdb-community-1.7-SNAPSHOT
but If I try the wiki instructions I get errors!

1) create index City.name on City (name) FULLTEXT ENGINE LUCENE

exception:

com.orientechnologies.orient.core.index.OIndexException: Index type : FULLTEXT is not supported. Types are [UNIQUE,FULLTEXT,FULLTEXT_HASH_INDEX,DICTIONARY_HASH_INDEX,DICTIONARY,UNIQUE_HASH_INDEX,NOTUNIQUE_HASH_INDEX,NOTUNIQUE]


2)
select * from V where name LUCENE "test*"

exception:


com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #27: Invalid keyword 'LUCENE' Command: select * from V where name LUCENE "test*" -----------------------------------^

Any idea?
Thanks
Stefano



    For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to a topic in the
Google Groups "OrientDB" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/orient-database/hYneKg4_Gw4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
orient-databa...@googlegroups.com

For more options, visit https://groups.google.com/d/optout.

Enrico Risa

unread,
Apr 28, 2014, 9:49:36 AM4/28/14
to orient-...@googlegroups.com
Hi Stefano,

yes because for now it is not bundled in the orientdb-community-1.7-SNAPSHOT.

You have to clone the module from here 

and run 

mvn assembly:assembly

the in the target directory you will find lucene-1.7-SNAPSHOT-dist.jar and put it under the lib directory in your Orientdb installation.

Or you can find the jar here

Stefano Migliucci

unread,
Apr 28, 2014, 10:12:13 AM4/28/14
to orient-...@googlegroups.com, enric...@gmail.com

Ok, thanks!
Stefano

Carlo Pradissitto

unread,
Apr 29, 2014, 9:04:32 AM4/29/14
to orient-...@googlegroups.com
Hi Enrico,
OrientDB web Studio doesn't work after adding your lucene-1.7-SNAPSHOT-dist.jar
I'm using orientdb-community-1.7-20140424.115531-159
with JDK 1.7.51 64bit

any idea?
thanks
Carlo



Il giorno giovedì 24 aprile 2014 18:14:14 UTC+2, Enrico Risa ha scritto:

Enrico Risa

unread,
Apr 29, 2014, 9:14:33 AM4/29/14
to orient-...@googlegroups.com

Hi Carlo,
Do you have the log of the server at startup?

Carlo Pradissitto

unread,
Apr 29, 2014, 9:32:59 AM4/29/14
to orient-...@googlegroups.com, enric...@gmail.com
Hi Enrico,
the server log in debug mode is attached
orient-server.log.0

Stefano Migliucci

unread,
Apr 29, 2014, 9:54:10 AM4/29/14
to orient-...@googlegroups.com, enric...@gmail.com
Hi Enrico,
I have the same problem.

I have
- a fresh installed orientdb-community-1.7-SNAPSHOT
- the jar you indicated me yesterday at https://github.com/orientechnologies/orientdb-lucene/releases/tag/1.7-SNAPSHOT in <ORIENT_HOME>/lib directory
but I renamed it in "orientdb-lucene-1.7-SNAPSHOT.jar"

When I ask the page localhost/studio/index.htm

Firefox Console answers:
<<Non è stata dichiarata la codifica caratteri del documento HTML. Il documento verrà visualizzato con del testo incomprensibile in alcune configurazioni del browser nel caso in cui contenga dei caratteri al di fuori dell'intervallo US-ASCII. La codifica caratteri di una pagina deve essere dichiarata nel documento o nel protocollo di trasferimento.>>

And http status code is:
 404 file not found

Any idea?
Thanks
Stefano

Enrico Risa

unread,
Apr 29, 2014, 10:45:47 AM4/29/14
to orient-...@googlegroups.com
I see, me too
i didn't try studio after installing orientdb-lucene

However i'm on it


Enrico Risa

unread,
Apr 29, 2014, 12:09:45 PM4/29/14
to orient-...@googlegroups.com
Hi Guys,

you can find a release that fix that issue here

guil...@adishatz.net

unread,
Apr 30, 2014, 5:37:39 AM4/30/14
to orient-...@googlegroups.com, enric...@gmail.com
Hi Enrico,

the fix causes a different error when connecting to the database:

Error: com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException: Exception during response processing.
Error: java.util.ServiceConfigurationError: com.orientechnologies.orient.core.index.OIndexFactory: Provider com.orientechnologies.lucene.OLuceneIndexFactory could not be instantiated: java.lang.NoClassDefFoundError: Could not initialize class com.orientechnologies.lucene.OLuceneIndexFactory
Error: java.lang.NoClassDefFoundError: Could not initialize class com.orientechnologies.lucene.OLuceneIndexFactory

Thanks
Guillaume

Enrico Risa

unread,
Apr 30, 2014, 7:04:00 AM4/30/14
to guil...@adishatz.net, orient-...@googlegroups.com
Hi  Guillaume,

i did not experience this problem. My fix was only to remove from the build a file called plugin.json
that prevent the correct loading of studio plugin. Have you downloaded the jar from github or created
with mvn assembly:assembly?

Carlo Pradissitto

unread,
Apr 30, 2014, 8:21:39 AM4/30/14
to orient-...@googlegroups.com
Hi Enrico,
what is the behavior in a distributed topology?
We have to refine the Lucene setup?

Enrico Risa

unread,
Apr 30, 2014, 8:49:19 AM4/30/14
to orient-...@googlegroups.com
Hi Carlo,

did you manage to install the module?

in a distributed topology will work like a normal Orientdb Index.
Each node has his own indexes.


Guillaume Lefranc

unread,
Apr 30, 2014, 10:08:21 AM4/30/14
to Enrico Risa, orient-...@googlegroups.com
Hi Enrico,

I have created the jar from github with maven.
If I download the jar it seems to be an older version, I get the error with SPATIAL index type missing.

Thanks

Carlo Pradissitto

unread,
Apr 30, 2014, 2:20:13 PM4/30/14
to orient-...@googlegroups.com
Do you mean that replication is delegated to OrientDB/hazelcast?

Luca Garulli

unread,
Apr 30, 2014, 3:18:57 PM4/30/14
to orient-database
Hi Carlo,
Yes. Replication is managed by OrientDB (through Hazelcast).

Lvc@



On 30 April 2014 20:20, Carlo Pradissitto <carlopra...@gmail.com> wrote:
Do you mean that replication is delegated to OrientDB/hazelcast?

guil...@adishatz.net

unread,
May 2, 2014, 2:21:06 PM5/2/14
to orient-...@googlegroups.com, Enrico Risa
Hi Guys,

I still have this problem. Maybe because it's not compatible with OrientDB-1.7-RC2?
If yes, could you point me in the direction of a SNAPSHOT release? I haven't found them.

Best regards
-GL

Enrico Risa

unread,
May 2, 2014, 3:23:34 PM5/2/14
to orient-...@googlegroups.com

Hi Guillaume,
Yes it is compatible with the 1.7 SNAPSHOT. 

I think there is not a SNAPSHOT release.

You have to clone the project, use checkout the branch develop and run ant clean install and you will find the folder

releases in the parent folder of the project that contains the snapshot release


Enrico

Enrico Risa

unread,
May 3, 2014, 1:46:43 PM5/3/14
to orient-...@googlegroups.com

Carlo Pradissitto

unread,
May 5, 2014, 9:03:00 AM5/5/14
to orient-...@googlegroups.com
Hi Enrico,
I need some advice, in order to better understand this module.

Using the GratefulDeadConcerts database included in the last ODB snapshot, I created a new class:
orientdb {GratefulDeadConcerts}> create class Songs extend V;
orientdb {GratefulDeadConcerts}> create property Songs.name string
orientdb {GratefulDeadConcerts}> create property Songs.type string
orientdb {GratefulDeadConcerts}> create property Songs.performances string
orientdb {GratefulDeadConcerts}> create property Songs.song_type string
orientdb {GratefulDeadConcerts}> insert into Songs from select from V where type = 'song';
Inserted record '584' in 1.464000 sec(s).

Then, I created a Lucene-based index:

orientdb {GratefulDeadConcerts}> create index Songs.name on Songs (name) FULLTEXT ENGINE LUCENE;

orientdb {GratefulDeadConcerts}> select name from Songs where name LUCENE "down";

----+-----+-------------------------------
#   |@RID |name
----+-----+-------------------------------
0   |#-2:1|CANT COME DOWN
1   |#-2:2|DOWN SO LONG
2   |#-2:3|WALK DOWN THE STREET
3   |#-2:4|TO LAY ME DOWN
4   |#-2:5|GOING DOWN THE ROAD FEELING BAD
5   |#-2:6|DOWN IN THE BOTTOM
6   |#-2:7|BEAT IT ON DOWN THE LINE
----+-----+-------------------------------

7 item(s) found. Query executed in 0.032 sec(s).

This is OK, but if I repeat the search starting from the superclass V:

orientdb {GratefulDeadConcerts}> select name from V where name LUCENE "down";

----+------+-------------------------------
#   |@RID  |name
----+------+-------------------------------
0   |#-2:1 |HEY BO DIDDLEY
1   |#-2:2 |IM A MAN
2   |#-2:3 |NOT FADE AWAY
3   |#-2:4 |BERTHA
4   |#-2:5 |GOING DOWN THE ROAD FEELING BAD
5   |#-2:6 |MONA
6   |#-2:7 |Bo_Diddley
7   |#-2:8 |Garcia
8   |#-2:9 |Spencer_Davis
9   |#-2:10|JACK STRAW
10  |#-2:11|JAM
11  |#-2:12|CASEY JONES
12  |#-2:13|DEAL
13  |#-2:14|TRUCKING
14  |#-2:15|BABY BLUE
15  |#-2:16|DRUMS
16  |#-2:17|STELLA BLUE
17  |#-2:18|MOUNTAIN JAM
18  |#-2:19|PROMISED LAND
19  |#-2:20|BEAT IT ON DOWN THE LINE
----+------+-------------------------------
LIMIT EXCEEDED: resultset contains more items not displayed (limit=20)

20 item(s) found. Query executed in 0.046 sec(s).

Maybe the module should accept the query only for the class whose property was indexed.
I suppose that the inheritance is top-down and not bottom-up
Anyway, the result must be correct.

orientdb {GratefulDeadConcerts}> select from V where type = "down";

0 item(s) found. Query executed in 0.549 sec(s).

This is OK



orientdb {GratefulDeadConcerts}> select from V where type LUCENE "down";

----+-----+------+---------+---------+----------+-----------+------------+-------------+-------------+--------------+--------------------------
#   |@RID |type  |song_type|in_sung_b|out_sung_b|performance|in_written_b|out_written_b|in_followed_b|out_followed_b|name
----+-----+------+---------+---------+----------+-----------+------------+-------------+-------------+--------------+--------------------------
0   |#9:1 |song  |cover    |null     |#9:8      |5          |null        |#9:7         |[size=4]     |[size=5]      |HEY BO DIDDLEY
1   |#9:2 |song  |cover    |null     |#9:9      |1          |null        |#9:9         |[size=2]     |[size=2]      |IM A MAN
2   |#9:3 |song  |cover    |null     |#9:50     |531        |null        |#9:27        |[size=65]    |[size=84]     |NOT FADE AWAY
3   |#9:4 |song  |original |null     |#9:8      |394        |null        |#9:93        |[size=76]    |[size=53]     |BERTHA
4   |#9:5 |song  |cover    |null     |#9:8      |293        |null        |#9:131       |[size=46]    |[size=39]     |GOING DOWN THE ROAD FEE...
5   |#9:6 |song  |cover    |null     |#9:50     |1          |null        |#9:7         |[size=2]     |[size=2]      |MONA
6   |#9:7 |artist|null     |[size=7] |null      |null       |[size=9]    |null         |null         |null          |Bo_Diddley
7   |#9:8 |artist|null     |[size=...|null      |null       |[size=4]    |null         |null         |null          |Garcia
8   |#9:9 |artist|null     |[size=2] |null      |null       |#9:2        |null         |null         |null          |Spencer_Davis
9   |#9:10|song  |original |null     |#9:50     |473        |null        |#9:93        |[size=99]    |[size=79]     |JACK STRAW
10  |#9:11|song  |original |null     |#9:335    |24         |null        |#9:350       |[size=20]    |[size=14]     |JAM
11  |#9:12|song  |original |null     |#9:8      |312        |null        |#9:93        |[size=33]    |[size=47]     |CASEY JONES
12  |#9:13|song  |original |null     |#9:8      |423        |null        |#9:93        |[size=65]    |[size=80]     |DEAL
13  |#9:14|song  |original |null     |#9:223    |519        |null        |#9:93        |[size=94]    |[size=60]     |TRUCKING
14  |#9:15|song  |null     |null     |null      |null       |null        |null         |[size=27]    |[size=46]     |BABY BLUE
15  |#9:16|song  |original |null     |#9:335    |1386       |null        |#9:335       |[size=92]    |[size=73]     |DRUMS
16  |#9:17|song  |original |null     |#9:8      |328        |null        |#9:93        |[size=46]    |[size=31]     |STELLA BLUE
17  |#9:18|song  |null     |null     |null      |null       |null        |null         |#11:14       |#11:7007      |MOUNTAIN JAM
18  |#9:19|song  |cover    |null     |#9:50     |427        |null        |#9:245       |[size=86]    |[size=87]     |PROMISED LAND
19  |#9:20|song  |cover    |null     |#9:50     |325        |null        |#9:169       |[size=65]    |[size=60]     |BEAT IT ON DOWN THE LINE
----+-----+------+---------+---------+----------+-----------+------------+-------------+-------------+--------------+--------------------------
LIMIT EXCEEDED: resultset contains more items not displayed (limit=20)

20 item(s) found. Query executed in 0.422 sec(s).

This is NOT OK

Thanks

Enrico Risa

unread,
May 5, 2014, 9:12:40 AM5/5/14
to orient-...@googlegroups.com
I will take a look
this

select from V where type LUCENE "down"

of course shouldn't work the the inheritance is top-down
I have the use case however  i will check it shortly

Thanks



Carlo Pradissitto

unread,
May 5, 2014, 10:04:10 AM5/5/14
to orient-...@googlegroups.com
Hi Enrico,
the creation of a Lucene-based index implies the creation of a new directory according to this model:
ORIENTDB_HOME/databases/mydb/myClass.property

In my experience, Lucene needs a fast-reading disk, so, in order to perform a dedicated system tuning, it might be very usefull a model like this:
ORIENTDB_HOME/databases/mydb/luceneIndexes/myClass.property

thanks

Marc Tigges

unread,
May 5, 2014, 12:33:19 PM5/5/14
to orient-...@googlegroups.com
Hello,

im using OrientDB 1.7rc2.
My OrientDB Studio does not work correctly with the lucene jar added into the lib folder.
When i add the lucene jar to my lib folder i cant log in into any database. I get asked
for the username and the passwort over and over again. If i delete lucene jar out
of the lib folder i am able to login again.

Enrico Risa

unread,
May 5, 2014, 12:41:09 PM5/5/14
to orient-...@googlegroups.com
Hi Marc

Have you download it from here https://github.com/orientechnologies/orientdb-lucene/releases ?

Or  Have you build it?






--

Marc Tigges

unread,
May 5, 2014, 12:43:16 PM5/5/14
to orient-...@googlegroups.com, enric...@gmail.com
Yes i downloaded it there.

Enrico Risa

unread,
May 5, 2014, 12:45:16 PM5/5/14
to orient-...@googlegroups.com
if you can try it with the OrientDB 1.7-SNAPSHOT

Marc Tigges

unread,
May 5, 2014, 2:14:56 PM5/5/14
to orient-...@googlegroups.com, enric...@gmail.com
If i build 1.7-SNAPSHOT and add it to lib it works fine. Thank you.

Andrea Ottaviani

unread,
May 6, 2014, 4:45:24 AM5/6/14
to orient-...@googlegroups.com, enric...@gmail.com
Hi Guys, i have an orientdb 1.7 SNAPSHOT installation with lucene integration.

I'm developing my own application. I have a lucene index field on a vertex. It seems to be work fine making queries from the studio, but not from my application where i have got this exception:

com.orientechnologies.orient.core.index.OIndexException: Index type : FULLTEXT is not supported. Types are [UNIQUE,FULLTEXT,FULLTEXT_HASH_INDEX,DICTIONARY_HASH_INDEX,DICTIONARY,UNIQUE_HASH_INDEX,NOTUNIQUE_HASH_INDEX,NOTUNIQUE]

Probably i should set up the lucene-1.7-SNAPSHOT-dist.jar dependencies in the pom.xml of my application: i tried to configure it in this way:
 
     <dependency>
    <groupId>com.orientechnologies</groupId>
    <artifactId>lucene</artifactId>
    <version>1.7-SNAPSHOT</version>
    <scope>compile</scope>
    </dependency>

...it doesn't  work properly, and i have got this error: Could not find artifact com.orientechnologies:lucene:jar:1.7-SNAPSHOT-dist in sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots) -> [Help 1]

Any Ideas ?

Enrico Risa

unread,
May 6, 2014, 4:53:17 AM5/6/14
to Andrea Ottaviani, orient-...@googlegroups.com
Hi Andrea,

are you using local or remote in your application?

Andrea Ottaviani

unread,
May 6, 2014, 5:07:59 AM5/6/14
to orient-...@googlegroups.com, Andrea Ottaviani, enric...@gmail.com
Thanks Enrico,
i'm using  remote configuration in my app !

Enrico Risa

unread,
May 6, 2014, 5:22:54 AM5/6/14
to orient-...@googlegroups.com, Andrea Ottaviani
How do you create the index from  your application?


Andrea Ottaviani

unread,
May 6, 2014, 5:29:26 AM5/6/14
to orient-...@googlegroups.com, Andrea Ottaviani, enric...@gmail.com
I have done my own schema, simply like this...

CREATE CLASS MyClass EXTENDS MySuperClass
CREATE PROPERTY MyClass.idx STRING
CREATE INDEX MyClass.idx on MyClass (idx) FULLTEXT ENGINE LUCENE


Thank you !

Enrico Risa

unread,
May 6, 2014, 5:39:01 AM5/6/14
to orient-...@googlegroups.com, Andrea Ottaviani
Where do you experience this error?

com.orientechnologies.orient.core.index.OIndexException: Index type : FULLTEXT is not supported. Types are [UNIQUE,FULLTEXT,FULLTEXT_HASH_INDEX,DICTIONARY_HASH_INDEX,DICTIONARY,UNIQUE_HASH_INDEX,NOTUNIQUE_HASH_INDEX,NOTUNIQUE]

Do you have the full stack?

Andrea Ottaviani

unread,
May 6, 2014, 5:58:32 AM5/6/14
to orient-...@googlegroups.com, Andrea Ottaviani, enric...@gmail.com
In the instruction where a try to acquire a db connection: 

"connectionPool.acquire(STORAGE_URL, STORAGE_USERNAME, STORAGE_PASSWORD);"

BELOW THE EXCEPTION....

Trying to connect to the remote host 127.0.0.1:2424/myapplication... 
Client connected to 127.0.0.1:2424/myapplication with session id=2 
Error on loading of index by configuration: {type:FULLTEXT,algorithm:LUCENE,valueContainerAlgorithm:SBTREEBONSAISET,name:MyClass.idx,indexDefinition:{className:MyClass,field:idx,keyType:STRING,collate:default,nullValuesIgnored:true},indexDefinitionClass:com.orientechnologies.orient.core.index.OPropertyIndexDefinition,clusters:[1],mapRid:null} 
com.orientechnologies.orient.core.index.OIndexException: Index type : FULLTEXT is not supported. Types are [UNIQUE,FULLTEXT,FULLTEXT_HASH_INDEX,DICTIONARY_HASH_INDEX,DICTIONARY,UNIQUE_HASH_INDEX,NOTUNIQUE_HASH_INDEX,NOTUNIQUE]
at com.orientechnologies.orient.core.index.OIndexes.createIndex(OIndexes.java:128)
at com.orientechnologies.orient.core.index.OIndexManagerRemote.fromStream(OIndexManagerRemote.java:131)
at com.orientechnologies.orient.core.type.ODocumentWrapperNoClass.reload(ODocumentWrapperNoClass.java:70)
at com.orientechnologies.orient.core.index.OIndexManagerAbstract.load(OIndexManagerAbstract.java:98)
at com.orientechnologies.orient.core.index.OIndexManagerAbstract.load(OIndexManagerAbstract.java:54)
at com.orientechnologies.orient.core.metadata.OMetadataDefault$2.call(OMetadataDefault.java:131)
at com.orientechnologies.orient.core.metadata.OMetadataDefault$2.call(OMetadataDefault.java:121)
at com.orientechnologies.common.concur.resource.OSharedContainerImpl.getResource(OSharedContainerImpl.java:53)
at com.orientechnologies.orient.client.remote.OStorageRemoteThread.getResource(OStorageRemoteThread.java:702)
at com.orientechnologies.orient.core.metadata.OMetadataDefault.init(OMetadataDefault.java:120)
at com.orientechnologies.orient.core.metadata.OMetadataDefault.load(OMetadataDefault.java:68)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:291)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:54)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTxPooled.<init>(ODatabaseDocumentTxPooled.java:47)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentPool.createResource(ODatabaseDocumentPool.java:44)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentPool.createResource(ODatabaseDocumentPool.java:20)
at com.orientechnologies.orient.core.db.ODatabasePoolBase$1.createNewResource(ODatabasePoolBase.java:72)
at com.orientechnologies.orient.core.db.ODatabasePoolBase$1.createNewResource(ODatabasePoolBase.java:61)
at com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:82)
at com.orientechnologies.common.concur.resource.OReentrantResourcePool.getResource(OReentrantResourcePool.java:63)
at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:149)
at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:134)
at com.orientechnologies.orient.core.db.ODatabasePoolBase.acquire(ODatabasePoolBase.java:119)
at it.andrea.myapplication.DBManager.getDefaultGraph(DBManager.java:263)
at it.andrea.myapplication.SchemaManager.getRouteEdges(SchemaManager.java:114)
at it.andrea.myapplication.SchemaManager.buildTraverseInRouteEdgeSubEdges(SchemaManager.java:85)
at it.andrea.myapplication.SchemaManager.<init>(SchemaManager.java:53)
at it.andrea.myapplication.SchemaManager.initialize(SchemaManager.java:60)
at it.andrea.myapplication.verticle.App.start(App.java:60)
at org.vertx.java.platform.Verticle.start(Verticle.java:82)
at org.vertx.java.platform.impl.DefaultPlatformManager$18.run(DefaultPlatformManager.java:1278)
at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:171)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:353)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:366)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
at java.lang.Thread.run(Thread.java:744)

Andrea Ottaviani

unread,
May 6, 2014, 6:15:11 AM5/6/14
to orient-...@googlegroups.com, Andrea Ottaviani, enric...@gmail.com
I think the problem it is in the pom.xml...
If i try to make a build of my application I get this...

Could not resolve dependencies for project .... Failure to find com.orientechnologies:lucene:jar:1.7-SNAPSHOT-dist in https://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-nexus-snapshots has elapsed or updates are forced -> [Help 1]

Enrico, Look at my lucene jar set up here below...Is this correct? 
  <dependency>
    <groupId>com.orientechnologies</groupId>
    <artifactId>lucene</artifactId>
    <version>1.7-SNAPSHOT-dist</version>
    <scope>compile</scope>
    </dependency>

guil...@adishatz.net

unread,
May 6, 2014, 7:37:28 AM5/6/14
to orient-...@googlegroups.com, enric...@gmail.com
Hi Enrico,

I still get the following error, even if I use orientdb-1.7-SNAPSHOT, with the lucene jar in release or even if I compile it myself with maven.

orientdb> connect remote:localhost/databases/test admin admin

Connecting to database [remote:localhost/databases/test] with user 'admin'...

Error: com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #6: Error on parsing query
Query:  name = 'admin' limit 1
-----------^

Error: java.util.ServiceConfigurationError: com.orientechnologies.orient.core.sql.operator.OQueryOperatorFactory: Provider com.orientechnologies.lucene.operator.OLuceneOperatorFactory could not be instantiated: java.lang.NoClassDefFoundError: com/orientechnologies/orient/core/index/OIndexCursor$OIndexCursorSingleValue

Error: java.lang.NoClassDefFoundError: com/orientechnologies/orient/core/index/OIndexCursor$OIndexCursorSingleValue

Error: java.lang.ClassNotFoundException: com.orientechnologies.orient.core.index.OIndexCursor$OIndexCursorSingleValue

Thanks for your help.

Enrico Risa

unread,
May 6, 2014, 2:03:03 PM5/6/14
to orient-...@googlegroups.com, Andrea Ottaviani
Hi Andrea,

there is a problem with remote, 
i saw that with studio all works but with java api like in your app doesn't work.
Can you try with the latest snapshot 1.7, should work now

Enrico

Montrazul

unread,
May 13, 2014, 1:58:04 AM5/13/14
to orient-...@googlegroups.com, Andrea Ottaviani, enric...@gmail.com
Hallo,

im working with the lates OrientDB 1.7-SNAPSHOT, with Windows 8 and Java 1.8.
I downloaded Lucene-1.7-SNAPSHOT from here and added it to the lib under 
ORIENTDB_HOME/lib/.
I restarted the server and tried to log in into my database. Unfortunately it is not 
possible while the lucene jar is in my lib folder:

Caused by: java.util.ServiceConfigurationError: com.orientechnologies.orient.core.sql.operator.OQueryOperatorFactory: Provider com.orientechnologies.lucene.operator.OLuceneOperatorFactory could not be instantiated: java.lang.NoClassDefFoundError: com/orientechnologies/orient/core/index/OIndexCursor$OIndexCursorSingleValue
at java.util.ServiceLoader.fail(ServiceLoader.java:224)
at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
at com.orientechnologies.orient.core.sql.OSQLEngine.getOperatorFactories(OSQLEngine.java:164)
at com.orientechnologies.orient.core.sql.OSQLEngine.getRecordOperators(OSQLEngine.java:320)
at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditionOperator(OSQLPredicate.java:205)
at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractCondition(OSQLPredicate.java:173)
at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditions(OSQLPredicate.java:126)
at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.text(OSQLPredicate.java:82)
... 22 more
Caused by: java.lang.NoClassDefFoundError: com/orientechnologies/orient/core/index/OIndexCursor$OIndexCursorSingleValue
at com.orientechnologies.lucene.operator.OLuceneOperatorFactory.<clinit>(OLuceneOperatorFactory.java:33)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:374)
at java.lang.Class.newInstance(Class.java:327)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
... 29 more
Caused by: java.lang.ClassNotFoundException: com.orientechnologies.orient.core.index.OIndexCursor$OIndexCursorSingleValue
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 37 more



Enrico Risa

unread,
May 13, 2014, 3:08:33 AM5/13/14
to orient-...@googlegroups.com, Andrea Ottaviani
Hi Seesm that

OIndexCursor$OIndexCursorSingleValue

Is not anymore in the latest snapshot. I have to fix it and make a new release


Message has been deleted

Montrazul

unread,
May 13, 2014, 2:43:30 PM5/13/14
to orient-...@googlegroups.com, Andrea Ottaviani, enric...@gmail.com
Oh thats great. Do you know already when it will be updated?

I need this. OrientDB is just too important :D

Enrico Risa

unread,
May 13, 2014, 2:59:42 PM5/13/14
to orient-...@googlegroups.com, Andrea Ottaviani
Hi Montrazul, 

i think tomorrow i will make a new release compatible with the latest snapshot and that can
be installed as a regular OrientDB plugin under $ORIENTDB_HOME/plugins

Enrico Risa

unread,
May 14, 2014, 4:56:23 AM5/14/14
to orient-...@googlegroups.com, Andrea Ottaviani
Hi all,
i've done a new release compatible with the latest 1.7-SNAPSHOT, you can find it here https://github.com/orientechnologies/orientdb-lucene/releases.
Remove the old jar under $ORIENTDB_HOME/lib and place the new one under $ORIENTDB_HOME/plugins.
When OrientDB is starting you should see in the log:

INFO Lucene index plugin installed and active. Lucene version: LUCENE_47 [OLuceneIndexPlugin]


Enrico

Montrazul

unread,
May 14, 2014, 5:10:00 AM5/14/14
to orient-...@googlegroups.com, Andrea Ottaviani, enric...@gmail.com
Hi Enrico,

The database starts again with your latest 1.7-SNAPSHOT and creating a lucene index manually in console
works too:

CREATE INDEX <name> ON <class-name> (prop-names) FULLTEXT ENGINE LUCENE

Unfortunately the java variant does not work. This:

OSchema schema = databaseDocumentTx.getMetadata().getSchema();
OClass oClass = schema.createClass("Foo");
oClass
.createProperty("name", OType.STRING);
oClass
.createIndex("City.name", "FULLTEXT", null, null, "LUCENE", new String[] { "name"});

Leads to this:

Exception in thread "main" com.orientechnologies.orient.core.index.OIndexException: Index type : FULLTEXT is not supported. Types are [UNIQUE,FULLTEXT,FULLTEXT_HASH_INDEX,DICTIONARY_HASH_INDEX,DICTIONARY,UNIQUE_HASH_INDEX,NOTUNIQUE_HASH_INDEX,NOTUNIQUE]

Best regards

Enrico Risa

unread,
May 14, 2014, 5:12:20 AM5/14/14
to orient-...@googlegroups.com, Andrea Ottaviani
Try it with the latest Orientdb 1.7-SNAPSHOT that has a fix for this Java Exception
 
Message has been deleted
Message has been deleted

Montrazul

unread,
May 14, 2014, 5:33:34 AM5/14/14
to orient-...@googlegroups.com, Andrea Ottaviani, enric...@gmail.com
If this is the latest OrientDB snapshort:


And If this is the latest lucene plugin:


The exception is not fixed :(



Btw now i see that the small java lucene index exmaple has a small mistake.
Class "Foo" is created but class "City" is used.

Enrico Risa

unread,
May 14, 2014, 5:35:37 AM5/14/14
to orient-...@googlegroups.com
From Java Api right?

i will check

Montrazul

unread,
May 14, 2014, 5:38:28 AM5/14/14
to orient-...@googlegroups.com, enric...@gmail.com
Right, from Java Api.

Enrico Risa

unread,
May 14, 2014, 5:38:57 AM5/14/14
to orient-...@googlegroups.com
Are you using embedded or remote ?

Montrazul

unread,
May 14, 2014, 5:44:58 AM5/14/14
to orient-...@googlegroups.com, enric...@gmail.com
Embedded plocal

Enrico Risa

unread,
May 14, 2014, 5:47:34 AM5/14/14
to orient-...@googlegroups.com
Could you try it with remote?
Start the server and connect with remote and create the index?

Montrazul

unread,
May 14, 2014, 5:57:13 AM5/14/14
to orient-...@googlegroups.com, enric...@gmail.com
Remote works fine.

Montrazul

unread,
May 14, 2014, 12:26:27 PM5/14/14
to orient-...@googlegroups.com, enric...@gmail.com
Do you need some more informations?
Unfortunately using remote mode is no option for me.

Vladimir Ziankevich

unread,
May 15, 2014, 6:30:49 AM5/15/14
to orient-...@googlegroups.com
Hi all!
I have problems with setting up lucene plugin.

I have installed OrientDB 1.7-rc2.
downloaded the latest plugin jar (lucene-1.7-SNAPSHOT-plugin.jar) from https://github.com/orientechnologies/orientdb-lucene/releases
Put it in the 'plugin' directory. But on the starting of database I receive error described in log:

2014-05-15 13:00:43:593 INFO Installing dynamic plugin 'studio-1.7-rc2.zip'... [OServerPluginManager]Error on installing dynamic plugin 'lucene-index'
null
-> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-> java.lang.reflect.Method.invoke(Method.java:606)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.startPluginClass(OServerPluginManager.java:327)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.installDynamicPlugin(OServerPluginManager.java:242)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.updatePlugin(OServerPluginManager.java:187)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.updatePlugins(OServerPluginManager.java:140)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.startup(OServerPluginManager.java:80)
-> com.orientechnologies.orient.server.OServer.registerPlugins(OServer.java:621)
-> com.orientechnologies.orient.server.OServer.activate(OServer.java:220)
-> com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:32)
SPATIAL
-> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-> java.lang.reflect.Method.invoke(Method.java:606)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.startPluginClass(OServerPluginManager.java:327)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.installDynamicPlugin(OServerPluginManager.java:242)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.updatePlugin(OServerPluginManager.java:187)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.updatePlugins(OServerPluginManager.java:140)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.startup(OServerPluginManager.java:80)
-> com.orientechnologies.orient.server.OServer.registerPlugins(OServer.java:621)
-> com.orientechnologies.orient.server.OServer.activate(OServer.java:220)
-> com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:32)

And some more 

2014-05-15 13:01:04:370 SEVE Internal server error:
java.lang.IllegalArgumentException: No enum constant com.orientechnologies.orient.core.metadata.schema.OType.LUCENE [ONetworkProtocolHttpDb]
2014-05-15 13:01:08:635 INFO Installing dynamic plugin 'studio-1.7-rc2.zip'... [OServerPluginManager]Error on installing dynamic plugin 'lucene-index'
null
-> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-> java.lang.reflect.Method.invoke(Method.java:606)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.startPluginClass(OServerPluginManager.java:327)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.installDynamicPlugin(OServerPluginManager.java:242)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.updatePlugin(OServerPluginManager.java:187)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.updatePlugins(OServerPluginManager.java:140)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.access$000(OServerPluginManager.java:54)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager$1.run(OServerPluginManager.java:87)
-> java.util.TimerThread.mainLoop(Timer.java:555)
-> java.util.TimerThread.run(Timer.java:505)
Could not initialize class com.orientechnologies.lucene.OLuceneIndexFactory
-> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-> java.lang.reflect.Method.invoke(Method.java:606)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.startPluginClass(OServerPluginManager.java:327)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.installDynamicPlugin(OServerPluginManager.java:242)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.updatePlugin(OServerPluginManager.java:187)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.updatePlugins(OServerPluginManager.java:140)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager.access$000(OServerPluginManager.java:54)
-> com.orientechnologies.orient.server.plugin.OServerPluginManager$1.run(OServerPluginManager.java:87)
-> java.util.TimerThread.mainLoop(Timer.java:555)
-> java.util.TimerThread.run(Timer.java:505)

Could someone help me?

Vladimir Ziankevich

unread,
May 15, 2014, 6:44:13 AM5/15/14
to orient-...@googlegroups.com
Hi all!
I have some problems with setting up lucene plugin.

I ve installed OrientDB 1.7-rc2.
I followed steps described on this page https://github.com/orientechnologies/orientdb-lucene/wiki
downloaded the latest plugin lucene-1.7-SNAPSHOT-plugin.jar, put it in the 'plugins' directory.
But on the starting of database I receive the next error:
четверг, 24 апреля 2014 г., 19:14:14 UTC+3 пользователь Enrico Risa написал:
Hi All,

a new module for OrientDB is available. The first integration OrientDB / Lucene is out.
The integration for now is focused on Full Text Index and Spatial Index. 

to install and use the module.

Give it a try,
contributions are welcome.

Best Regards
Enrico

 

Enrico Risa

unread,
May 15, 2014, 6:55:11 AM5/15/14
to orient-...@googlegroups.com
Hi Vladimir
it does't work with OrientDB 1.7-rc2
you have to download the latest snapshot from here


Montrazul

unread,
May 15, 2014, 7:11:50 AM5/15/14
to orient-...@googlegroups.com, enric...@gmail.com
No, unfortuantely the latest 1.7-SNAPSHOT (last modified Thu May 15 04:58:24 CDT 2014)
still does not work with lucene in plocal mode.

Vladimir Ziankevich

unread,
May 15, 2014, 7:13:42 AM5/15/14
to orient-...@googlegroups.com, enric...@gmail.com
Thank you Enrico. I've tried to setting up this one: orientdb-community-1.7-20140515.095753-200-distribution.zip

четверг, 15 мая 2014 г., 13:55:11 UTC+3 пользователь Enrico Risa написал:

Enrico Risa

unread,
May 15, 2014, 7:15:52 AM5/15/14
to orient-...@googlegroups.com
Yes for now it's working only with remote i know. 
Because i've made it as a Plugin and if you do not have the server, it doesn't work. 
I know how to fix it, i will do it shortly

Vladimir Ziankevich

unread,
May 15, 2014, 9:51:41 AM5/15/14
to orient-...@googlegroups.com, enric...@gmail.com
Thank! Migrating on 1.7-SNAPSHOT helped. But there is one more question.

I've tried to create lucene index with KeywordAnalyzer. Index creation command:
create index name_LUCENE_INDEX on Location (name) FULLTEXT ENGINE LUCENE METADATA {"analyzer":"org.apache.lucene.analysis.core.KeywordAnalyzer"}

But there was error thrown.

2014-05-15 16:42:20:590 INFO OrientDB Server v1.7-SNAPSHOT is active. [OServer]java.lang.NoSuchMethodException: org.apache.lucene.analysis.core.Keywor
dAnalyzer.<init>(org.apache.lucene.util.Version)
        at java.lang.Class.getConstructor0(Class.java:2810)
        at java.lang.Class.getConstructor(Class.java:1718)
        at com.orientechnologies.lucene.manager.OLuceneIndexManagerAbstract.getAnalyzer(OLuceneIndexManagerAbstract.java:323)
        at com.orientechnologies.lucene.manager.OLuceneFullTextIndexManager.createIndexWriter(OLuceneFullTextIndexManager.java:53)
        at com.orientechnologies.lucene.manager.OLuceneIndexManagerAbstract.reOpen(OLuceneIndexManagerAbstract.java:123)
        at com.orientechnologies.lucene.manager.OLuceneIndexManagerAbstract.initIndex(OLuceneIndexManagerAbstract.java:112)
        at com.orientechnologies.lucene.manager.OLuceneIndexManagerAbstract.createIndex(OLuceneIndexManagerAbstract.java:97)
        at com.orientechnologies.lucene.OLuceneIndexEngine.create(OLuceneIndexEngine.java:60)
        at com.orientechnologies.orient.core.index.OIndexAbstract.create(OIndexAbstract.java:219)
        at com.orientechnologies.orient.core.index.OIndexMultiValues.create(OIndexMultiValues.java:235)
        at com.orientechnologies.lucene.index.OLuceneFullTextIndex.create(OLuceneFullTextIndex.java:45)
        at com.orientechnologies.lucene.index.OLuceneFullTextIndex.create(OLuceneFullTextIndex.java:32)
        at com.orientechnologies.orient.core.index.OIndexManagerShared.createIndex(OIndexManagerShared.java:143)
        at com.orientechnologies.orient.core.index.OIndexManagerProxy.createIndex(OIndexManagerProxy.java:75)
        at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createIndex(OClassImpl.java:1136)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLCreateIndex.execute(OCommandExecutorSQLCreateIndex.java:235)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:60)
        at com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:96)
        at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:85)
        at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:59)
        at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.execute(OServerCommandPostCommand.java:73)

        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:153)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:549)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:45)

2014-05-15 16:43:49:392 INFO - Rebuilding index GeoLocationSpike.name_en_LUCENE_INDEX... [OIndexRebuildOutputListener]
2014-05-15 16:43:49:438 INFO --> OK, indexed 0 items in 46 ms [OIndexRebuildOutputListener]
2014-05-15 16:43:49:445 SEVE Internal server error:
com.orientechnologies.orient.core.index.OIndexException: Error on rebuilding the index for clusters: [location]
--> java.lang.NullPointerException [ONetworkProtocolHttpDb]java.lang.NoSuchMethodException: org.apache.lucene.analysis.core.KeywordAnalyzer.<init>(org
.apache.lucene.util.Version)
        at java.lang.Class.getConstructor0(Class.java:2810)
        at java.lang.Class.getConstructor(Class.java:1718)
        at com.orientechnologies.lucene.manager.OLuceneIndexManagerAbstract.getAnalyzer(OLuceneIndexManagerAbstract.java:323)
        at com.orientechnologies.lucene.manager.OLuceneFullTextIndexManager.createIndexWriter(OLuceneFullTextIndexManager.java:53)
        at com.orientechnologies.lucene.manager.OLuceneIndexManagerAbstract.reOpen(OLuceneIndexManagerAbstract.java:123)
        at com.orientechnologies.lucene.manager.OLuceneIndexManagerAbstract.initIndex(OLuceneIndexManagerAbstract.java:112)
        at com.orientechnologies.lucene.manager.OLuceneIndexManagerAbstract.createIndex(OLuceneIndexManagerAbstract.java:97)
        at com.orientechnologies.lucene.OLuceneIndexEngine.create(OLuceneIndexEngine.java:60)
        at com.orientechnologies.orient.core.index.OIndexAbstract.create(OIndexAbstract.java:219)
        at com.orientechnologies.orient.core.index.OIndexMultiValues.create(OIndexMultiValues.java:235)
        at com.orientechnologies.lucene.index.OLuceneFullTextIndex.create(OLuceneFullTextIndex.java:45)
        at com.orientechnologies.lucene.index.OLuceneFullTextIndex.create(OLuceneFullTextIndex.java:32)
        at com.orientechnologies.orient.core.index.OIndexManagerShared.createIndex(OIndexManagerShared.java:143)
        at com.orientechnologies.orient.core.index.OIndexManagerProxy.createIndex(OIndexManagerProxy.java:75)
        at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createIndex(OClassImpl.java:1136)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLCreateIndex.execute(OCommandExecutorSQLCreateIndex.java:235)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:60)
        at com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:96)
        at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:85)
        at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:59)
        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1100)
        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:350)
        at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:160)

        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:45)


четверг, 15 мая 2014 г., 14:15:52 UTC+3 пользователь Enrico Risa написал:
Message has been deleted
Message has been deleted

Montrazul

unread,
May 18, 2014, 9:30:21 AM5/18/14
to orient-...@googlegroups.com, enric...@gmail.com
Found another problem using remote mode.
The SQL Query in OrientDB Studio:

select * from my_class where my_property LUCENE "foo"

works fine and delivers some records. 
Using java api:

return this.graph.getVertices("my_class.my_property","foo");

it does not return any record.

Montrazul

unread,
May 19, 2014, 4:30:03 AM5/19/14
to orient-...@googlegroups.com, enric...@gmail.com
When will it be fixed?
Right now you cant use lucene because in plocal mode you cant create the index 
and in remote mode you cant select from the index using java api.

Enrico Risa

unread,
May 19, 2014, 4:47:52 AM5/19/14
to orient-...@googlegroups.com
Hi Montrazul,

i will be fixed in a couple of days. I'm working on it right now

Enrico Risa

unread,
May 19, 2014, 11:27:50 AM5/19/14
to orient-...@googlegroups.com
Hi Montrazul,

now you can use orientdb-lucene in plocal mode
please the installing process written here under Embedded Mode


Let me know if you have problem

Enrico

Message has been deleted

Montrazul

unread,
May 19, 2014, 12:19:55 PM5/19/14
to orient-...@googlegroups.com, enric...@gmail.com
Oh great! Creating the index using java api and embedded mode works fine!
However. There is a new problem. The database does not shutdown properly
anymore. There is a permanent lock after graph.shutdown();
So i have to crash it manually. Unfortunately orientdb then isnt able to 
rebuild the indices because he cant find the FULLTEXT index because it 
isnt in the plugins anymore. Its included using maven.

The second problem is that you cant login into the database. there 
is an invinite request loop for entering username and password. but 
i think that isnt related to the lucene index. I think thats another bug
in the latest orientdb 1.7-SNAPSHOT.

Montrazul

unread,
May 19, 2014, 1:28:40 PM5/19/14
to orient-...@googlegroups.com, enric...@gmail.com
Forgot something in my last post. Ofcourse the rebuild of the lucene index
just fails in console. The rebuild using java works.
So maybe the shutdown bug is also not related to lucene.
Message has been deleted

Montrazul

unread,
May 19, 2014, 2:32:04 PM5/19/14
to orient-...@googlegroups.com, enric...@gmail.com
Ok it is definitely related to lucene.

here the graph shuts down:

public static void main(String[] args) {
String pathToDatabase = "plocal:D:/testDB";
GraphDAOOrientDB graphDAO = new GraphDAOOrientDB(pathToDatabase);
graphDAO.openGraph(false);
OrientVertexType vertexType = graphDAO.createVertexType("test", null);
graphDAO.createProperty(vertexType, "test", OType.STRING);
graphDAO.createIndex(vertexType, "test", INDEX_TYPE.DICTIONARY_HASH_INDEX, "test");
graphDAO.closeGraph();
}


here not:


public static void main(String[] args) {
String pathToDatabase = "plocal:D:/testDB";
GraphDAOOrientDB graphDAO = new GraphDAOOrientDB(pathToDatabase);
graphDAO.openGraph(false);
OrientVertexType vertexType = graphDAO.createVertexType("test", null);
graphDAO.createProperty(vertexType, "test", OType.STRING);
graphDAO.createLuceneIndex(vertexType, "test2", "test");
graphDAO.closeGraph();
}

Enrico Risa

unread,
May 19, 2014, 3:13:15 PM5/19/14
to orient-...@googlegroups.com

Any stack trace, errors?

I'm not having shutdown problem with this code




2014-05-19 20:30 GMT+02:00 Montrazul <tigge...@googlemail.com>:
Ok it is definitely related to lucene.

this works:

public static void main(String[] args) {
String pathToDatabase = "plocal:D:/testDB";
GraphDAOOrientDB graphDAO = new GraphDAOOrientDB(pathToDatabase);
graphDAO.openGraph(false);
OrientVertexType vertexType = graphDAO.createVertexType("test", null);
graphDAO.createProperty(vertexType, "test", OType.STRING);
graphDAO.createIndex(vertexType, "test", INDEX_TYPE.DICTIONARY_HASH_INDEX, "test");
graphDAO.closeGraph();
}


this not:

public static void main(String[] args) {
String pathToDatabase = "plocal:D:/testDB";
GraphDAOOrientDB graphDAO = new GraphDAOOrientDB(pathToDatabase);
graphDAO.openGraph(false);
OrientVertexType vertexType = graphDAO.createVertexType("test", null);
graphDAO.createProperty(vertexType, "test", OType.STRING);
graphDAO.createLuceneIndex(vertexType, "test2", "test");
graphDAO.closeGraph();
}



Am Montag, 19. Mai 2014 19:28:40 UTC+2 schrieb Montrazul:

Montrazul

unread,
May 19, 2014, 3:50:43 PM5/19/14
to orient-...@googlegroups.com, enric...@gmail.com
That is strange.... exactly the same code::

public static void main(String[] args) {
String pathToDatabase = "plocal:D:/testDB";

OrientGraph graph = new OrientGraph(pathToDatabase, false);

OrientVertexType type = graph.createVertexType("City");
type.createProperty("latitude", OType.DOUBLE);
type.createProperty("longitude", OType.DOUBLE);
type.createProperty("name", OType.STRING);
type.createIndex("City.name", "FULLTEXT", null, null, "LUCENE", new String[] { "name" });

graph.addVertex("class:City", new Object[] { "name", "London" });
graph.addVertex("class:City", new Object[] { "name", "Rome" });

graph.commit();
Iterable<Vertex> vertexes = graph.getVertices("City.name", "London");
for (Vertex v : vertexes) {
System.out.println(v.getId());
}
graph.shutdown();
}

And the database does not shut down. No exception, no stacktrace. Programm is just running and
the database is locked.

I used the latest 1.7-SNAPSHOT and




<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-lucene</artifactId>
<version>1.7-SNAPSHOT</version>
</dependency>
Message has been deleted

Patrick Zhan

unread,
Apr 7, 2015, 1:02:39 PM4/7/15
to orient-...@googlegroups.com, enric...@gmail.com
Hi, not sure if I should be asking here but hope you can help: I'm having an issue similar to Montrazul's issue. When I do a

select * from my_class where my_property LUCENE "foo"

in SQL Query in OrientDB Studio, it works fine, but when I use java api:


return this.graph.getVertices("my_class.my_property","foo");

it doesn't work. The difference here is I use an EMBEDDEDMAP type property and it works fine on a STRING type property for instance. Am I missing something?

I'm using orientdb 2.0.6.

Patrick Zhan

unread,
Apr 8, 2015, 9:50:19 AM4/8/15
to orient-...@googlegroups.com, enric...@gmail.com
Ok, just found a way to make it work but I think there's some fix to make in orientdb:

When creating the index

CREATE INDEX my_class.my_property ON my_class (my_property by value) FULLTEXT ENGINE LUCENE

where my_property is of type EMBEDDEDMAP (didn't try with others), even though the linked type is specified, you have to tell the index the type of the key or else it just doesn't work (it should use the linked type of the container I guess). So the correct command for creating the index is :

CREATE INDEX my_class.my_property ON my_class (my_property by value) FULLTEXT ENGINE LUCENE my_type

where my_type is String for instance.

If I'm not clear enough feel free to ask.
Reply all
Reply to author
Forward
0 new messages