You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Roy Teeuwen <ro...@teeuwen.be> on 2017/05/08 13:01:48 UTC
Oak indexes
Hey all,
I got a question relating the oak:indexes in Jackrabbit OAK. Is it possible to actually open these indexes and see what is inside them? I know it is possible to use Luke to open a Lucene index and query it manually, is this also possible for the property index and the Lucene index inside oak? If so, how would I go about this, where are they situated on file system so that I could open them with Luke or something
Thanks!
Roy
Re: Oak indexes
Posted by Alex Parvulescu <al...@gmail.com>.
Hi,
For completeness, here's the link where this is documented [0].
best,
alex
[0] http://jackrabbit.apache.org/oak/docs/query/lucene.html#luke
On Mon, May 8, 2017 at 4:26 PM, Roy Teeuwen <ro...@teeuwen.be> wrote:
> Works like a charm, thanks
>
> Roy
>
> > On 8 May 2017, at 15:39, Vikas Saurabh <vi...@gmail.com> wrote:
> >
> > Hi Roy,
> >
> > On Mon, May 8, 2017 at 6:52 PM, Roy Teeuwen <ro...@teeuwen.be> wrote:
> >> Invalid directory at the location, check console for more information.
> Last Exception: java.lang.IllegalArgumentException: A SPI class of type
> org.apache.lucene.codes.Codec with name 'oakCodec' does not exist. You need
> to add the corresponding jar file supporting this SPI to your classpath.
> >>
> > I use:
> > java -cp "oak-lucene-1.X.Y.jar;luke-with-deps.jar" org.getopt.luke.Luke
> > which resolves the codec.
> >
> > Thanks,
> > Vikas
>
>
Re: Oak indexes
Posted by Roy Teeuwen <ro...@teeuwen.be>.
Works like a charm, thanks
Roy
> On 8 May 2017, at 15:39, Vikas Saurabh <vi...@gmail.com> wrote:
>
> Hi Roy,
>
> On Mon, May 8, 2017 at 6:52 PM, Roy Teeuwen <ro...@teeuwen.be> wrote:
>> Invalid directory at the location, check console for more information. Last Exception: java.lang.IllegalArgumentException: A SPI class of type org.apache.lucene.codes.Codec with name 'oakCodec' does not exist. You need to add the corresponding jar file supporting this SPI to your classpath.
>>
> I use:
> java -cp "oak-lucene-1.X.Y.jar;luke-with-deps.jar" org.getopt.luke.Luke
> which resolves the codec.
>
> Thanks,
> Vikas
Re: Oak indexes
Posted by Vikas Saurabh <vi...@gmail.com>.
Hi Roy,
On Mon, May 8, 2017 at 6:52 PM, Roy Teeuwen <ro...@teeuwen.be> wrote:
> Invalid directory at the location, check console for more information. Last Exception: java.lang.IllegalArgumentException: A SPI class of type org.apache.lucene.codes.Codec with name 'oakCodec' does not exist. You need to add the corresponding jar file supporting this SPI to your classpath.
>
I use:
java -cp "oak-lucene-1.X.Y.jar;luke-with-deps.jar" org.getopt.luke.Luke
which resolves the codec.
Thanks,
Vikas
Re: Oak indexes
Posted by Tommaso Teofili <to...@gmail.com>.
Hi Roy,
Lucene uses Java Service Loader for identifying extensions of its APIs
(codec, tokenizer, etc.), the mentioned OakCodec [1] implementation sits in
oak-lucene.
Regards,
Tommaso
[1] :
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/OakCodec.java
Il giorno lun 8 mag 2017 alle ore 15:22 Roy Teeuwen <ro...@teeuwen.be> ha
scritto:
> Hey Tommaso,
>
> Cool thanks. I tried it out, and when using luke-4.7.0 jar I get the
> following exception:
>
> Invalid directory at the location, check console for more information.
> Last Exception: java.lang.IllegalArgumentException: A SPI class of type
> org.apache.lucene.codes.Codec with name 'oakCodec' does not exist. You need
> to add the corresponding jar file supporting this SPI to your classpath.
>
> Could you tell me which jar it is that I should be adding to the
> classpath? Thanks!
>
> Greetings
> Roy
> > On 8 May 2017, at 15:07, Tommaso Teofili <to...@apache.org> wrote:
> >
> > Hi Roy,
> >
> > if you have copy on read enabled (it is by default) for the Oak Lucene
> > index you should be able to take the index at their paths on the file
> > systems and use Luke as per any other Lucene index (btw Oak is currently
> > using Lucene 4.7.1).
> >
> > Hope it helps,
> > Tommaso
> >
> > [1] : http://jackrabbit.apache.org/oak/docs/query/lucene.html#CopyOnRead
> >
> > Il giorno lun 8 mag 2017 alle ore 15:01 Roy Teeuwen <ro...@teeuwen.be> ha
> > scritto:
> >
> >> Hey all,
> >>
> >> I got a question relating the oak:indexes in Jackrabbit OAK. Is it
> >> possible to actually open these indexes and see what is inside them? I
> know
> >> it is possible to use Luke to open a Lucene index and query it
> manually, is
> >> this also possible for the property index and the Lucene index inside
> oak?
> >> If so, how would I go about this, where are they situated on file
> system so
> >> that I could open them with Luke or something
> >>
> >> Thanks!
> >> Roy
> >>
>
>
Re: Oak indexes
Posted by Roy Teeuwen <ro...@teeuwen.be>.
Hey Tommaso,
Cool thanks. I tried it out, and when using luke-4.7.0 jar I get the following exception:
Invalid directory at the location, check console for more information. Last Exception: java.lang.IllegalArgumentException: A SPI class of type org.apache.lucene.codes.Codec with name 'oakCodec' does not exist. You need to add the corresponding jar file supporting this SPI to your classpath.
Could you tell me which jar it is that I should be adding to the classpath? Thanks!
Greetings
Roy
> On 8 May 2017, at 15:07, Tommaso Teofili <to...@apache.org> wrote:
>
> Hi Roy,
>
> if you have copy on read enabled (it is by default) for the Oak Lucene
> index you should be able to take the index at their paths on the file
> systems and use Luke as per any other Lucene index (btw Oak is currently
> using Lucene 4.7.1).
>
> Hope it helps,
> Tommaso
>
> [1] : http://jackrabbit.apache.org/oak/docs/query/lucene.html#CopyOnRead
>
> Il giorno lun 8 mag 2017 alle ore 15:01 Roy Teeuwen <ro...@teeuwen.be> ha
> scritto:
>
>> Hey all,
>>
>> I got a question relating the oak:indexes in Jackrabbit OAK. Is it
>> possible to actually open these indexes and see what is inside them? I know
>> it is possible to use Luke to open a Lucene index and query it manually, is
>> this also possible for the property index and the Lucene index inside oak?
>> If so, how would I go about this, where are they situated on file system so
>> that I could open them with Luke or something
>>
>> Thanks!
>> Roy
>>
Re: Oak indexes
Posted by Tommaso Teofili <to...@apache.org>.
Hi Roy,
if you have copy on read enabled (it is by default) for the Oak Lucene
index you should be able to take the index at their paths on the file
systems and use Luke as per any other Lucene index (btw Oak is currently
using Lucene 4.7.1).
Hope it helps,
Tommaso
[1] : http://jackrabbit.apache.org/oak/docs/query/lucene.html#CopyOnRead
Il giorno lun 8 mag 2017 alle ore 15:01 Roy Teeuwen <ro...@teeuwen.be> ha
scritto:
> Hey all,
>
> I got a question relating the oak:indexes in Jackrabbit OAK. Is it
> possible to actually open these indexes and see what is inside them? I know
> it is possible to use Luke to open a Lucene index and query it manually, is
> this also possible for the property index and the Lucene index inside oak?
> If so, how would I go about this, where are they situated on file system so
> that I could open them with Luke or something
>
> Thanks!
> Roy
>