You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Sean Bridges <se...@gmail.com> on 2013/01/29 23:48:31 UTC

Pulsing40PostingsFormat in lucene 4.1

Hello,

We are trying to upgrade from lucene 4.0 to 4.1.  Our indexes were written
using Pulsing40PostingsFormat, which doesn't seem to be supported in 4.1.
 For writing new indexes, we can switch to Pulsing41PostingsFormat, but is
there an easy way to read our old indexes using Lucene 4.1?

What are the best practices for compatibility when using
PostingFormat/Codecs.  Pulsing40PostingsFormat was marked @experimental, so
perhaps we shouldn't have used it.  But every PostingFormat/Codec shipped
in 4.1 is either @experimental or @deprecated.

Thanks,

Sean

Re: Pulsing40PostingsFormat in lucene 4.1

Posted by Michael McCandless <lu...@mikemccandless.com>.
On Tue, Jan 29, 2013 at 7:39 PM, Sean Bridges <se...@gmail.com> wrote:

> How do we avoid similar situations in the future?  Is Pulsing41PostingsFormat
> going to be maintained in future versions of Lucene?  What are the
> safe PostingFormat/Codecs
> to use?  Every PostingFormat/Codec is @deprecated or @experimental.

Well ... only the default Codec is guaranteed to have back compat
through the next major release (even though it's marked experimental,
which "just" means the APIs are free to suddenly change).

Any other Codec part may change.

Mike McCandless

http://blog.mikemccandless.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Pulsing40PostingsFormat in lucene 4.1

Posted by Sean Bridges <se...@gmail.com>.
Thanks, we will try the class path trickery.

How do we avoid similar situations in the future?  Is Pulsing41PostingsFormat
going to be maintained in future versions of Lucene?  What are the
safe PostingFormat/Codecs
to use?  Every PostingFormat/Codec is @deprecated or @experimental.

Sean


On Tue, Jan 29, 2013 at 3:21 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> Another option would be, using 4.0, use addIndexes(IndexReader[]) into
> a new index, to convert your entire index into the supported (back
> compat) codec (Lucene40).
>
> Don't use addIndexes(Directory[]) as this just copies files.
>
> Then you can read that resulting index with 4.1.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Tue, Jan 29, 2013 at 6:18 PM, Michael McCandless
> <lu...@mikemccandless.com> wrote:
> > Woops, sorry: PulsingPostingsFormat was already moved from core to
> > codecs as of 4.0 (not in 4.1 like I said before).
> >
> > And ... yes, you need Pulsing40PostingsFormat on your classpath to
> > read your 4.0 indices with 4.1.  I think you need to excise the
> > sources and get them on the classpath?  But this will be tricky:
> > Lucene40PulsingPF uses various codec APIs (eg BlockTreeTermsReader)
> > from 4.0 as well, which will conflict with the 4.1 classes by the same
> > package/name...
> >
> > Mike McCandless
> >
> > http://blog.mikemccandless.com
> >
> > On Tue, Jan 29, 2013 at 6:11 PM, Sean Bridges <se...@gmail.com>
> wrote:
> >> Do I need the Pulsing40PostingsFormat class to read my indexes though?
> >> Pulsing40PostingsFormat isn't shipped with lucene 4.1.
> >>
> >> I have index files with names like _0_Pulsing40_0.frq.  When I try to
> open
> >> my index I get,
> >>
> >> java.lang.IllegalArgumentException: A SPI class of type
> >> org.apache.lucene.codecs.PostingsFormat with name 'Pulsing40' does not
> >> exist. You need to add the corresponding JAR file supporting this SPI to
> >> your classpath.The current classpath supports the following names:
> >> [Lucene40, Lucene41, Pulsing41, SimpleText, Memory, BloomFilter, Direct]
> >>
> >> Thanks,
> >>
> >> Sean
> >>
> >>
> >> On Tue, Jan 29, 2013 at 2:53 PM, Michael McCandless <
> >> lucene@mikemccandless.com> wrote:
> >>
> >>> Pulsing41PostingsFormat was just moved out of core to the "codecs"
> module.
> >>>
> >>> Still, the worst case (had it been deleted) would be to revive the
> >>> code from the past release and put it in your classpath, so old
> >>> indices could be read.
> >>>
> >>> Mike McCandless
> >>>
> >>> http://blog.mikemccandless.com
> >>>
> >>> On Tue, Jan 29, 2013 at 5:48 PM, Sean Bridges <se...@gmail.com>
> >>> wrote:
> >>> > Hello,
> >>> >
> >>> > We are trying to upgrade from lucene 4.0 to 4.1.  Our indexes were
> >>> written
> >>> > using Pulsing40PostingsFormat, which doesn't seem to be supported in
> 4.1.
> >>> >  For writing new indexes, we can switch to Pulsing41PostingsFormat,
> but
> >>> is
> >>> > there an easy way to read our old indexes using Lucene 4.1?
> >>> >
> >>> > What are the best practices for compatibility when using
> >>> > PostingFormat/Codecs.  Pulsing40PostingsFormat was marked
> @experimental,
> >>> so
> >>> > perhaps we shouldn't have used it.  But every PostingFormat/Codec
> shipped
> >>> > in 4.1 is either @experimental or @deprecated.
> >>> >
> >>> > Thanks,
> >>> >
> >>> > Sean
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >>> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>>
> >>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Pulsing40PostingsFormat in lucene 4.1

Posted by Michael McCandless <lu...@mikemccandless.com>.
Another option would be, using 4.0, use addIndexes(IndexReader[]) into
a new index, to convert your entire index into the supported (back
compat) codec (Lucene40).

Don't use addIndexes(Directory[]) as this just copies files.

Then you can read that resulting index with 4.1.

Mike McCandless

http://blog.mikemccandless.com

On Tue, Jan 29, 2013 at 6:18 PM, Michael McCandless
<lu...@mikemccandless.com> wrote:
> Woops, sorry: PulsingPostingsFormat was already moved from core to
> codecs as of 4.0 (not in 4.1 like I said before).
>
> And ... yes, you need Pulsing40PostingsFormat on your classpath to
> read your 4.0 indices with 4.1.  I think you need to excise the
> sources and get them on the classpath?  But this will be tricky:
> Lucene40PulsingPF uses various codec APIs (eg BlockTreeTermsReader)
> from 4.0 as well, which will conflict with the 4.1 classes by the same
> package/name...
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Tue, Jan 29, 2013 at 6:11 PM, Sean Bridges <se...@gmail.com> wrote:
>> Do I need the Pulsing40PostingsFormat class to read my indexes though?
>> Pulsing40PostingsFormat isn't shipped with lucene 4.1.
>>
>> I have index files with names like _0_Pulsing40_0.frq.  When I try to open
>> my index I get,
>>
>> java.lang.IllegalArgumentException: A SPI class of type
>> org.apache.lucene.codecs.PostingsFormat with name 'Pulsing40' does not
>> exist. You need to add the corresponding JAR file supporting this SPI to
>> your classpath.The current classpath supports the following names:
>> [Lucene40, Lucene41, Pulsing41, SimpleText, Memory, BloomFilter, Direct]
>>
>> Thanks,
>>
>> Sean
>>
>>
>> On Tue, Jan 29, 2013 at 2:53 PM, Michael McCandless <
>> lucene@mikemccandless.com> wrote:
>>
>>> Pulsing41PostingsFormat was just moved out of core to the "codecs" module.
>>>
>>> Still, the worst case (had it been deleted) would be to revive the
>>> code from the past release and put it in your classpath, so old
>>> indices could be read.
>>>
>>> Mike McCandless
>>>
>>> http://blog.mikemccandless.com
>>>
>>> On Tue, Jan 29, 2013 at 5:48 PM, Sean Bridges <se...@gmail.com>
>>> wrote:
>>> > Hello,
>>> >
>>> > We are trying to upgrade from lucene 4.0 to 4.1.  Our indexes were
>>> written
>>> > using Pulsing40PostingsFormat, which doesn't seem to be supported in 4.1.
>>> >  For writing new indexes, we can switch to Pulsing41PostingsFormat, but
>>> is
>>> > there an easy way to read our old indexes using Lucene 4.1?
>>> >
>>> > What are the best practices for compatibility when using
>>> > PostingFormat/Codecs.  Pulsing40PostingsFormat was marked @experimental,
>>> so
>>> > perhaps we shouldn't have used it.  But every PostingFormat/Codec shipped
>>> > in 4.1 is either @experimental or @deprecated.
>>> >
>>> > Thanks,
>>> >
>>> > Sean
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Pulsing40PostingsFormat in lucene 4.1

Posted by Michael McCandless <lu...@mikemccandless.com>.
Woops, sorry: PulsingPostingsFormat was already moved from core to
codecs as of 4.0 (not in 4.1 like I said before).

And ... yes, you need Pulsing40PostingsFormat on your classpath to
read your 4.0 indices with 4.1.  I think you need to excise the
sources and get them on the classpath?  But this will be tricky:
Lucene40PulsingPF uses various codec APIs (eg BlockTreeTermsReader)
from 4.0 as well, which will conflict with the 4.1 classes by the same
package/name...

Mike McCandless

http://blog.mikemccandless.com

On Tue, Jan 29, 2013 at 6:11 PM, Sean Bridges <se...@gmail.com> wrote:
> Do I need the Pulsing40PostingsFormat class to read my indexes though?
> Pulsing40PostingsFormat isn't shipped with lucene 4.1.
>
> I have index files with names like _0_Pulsing40_0.frq.  When I try to open
> my index I get,
>
> java.lang.IllegalArgumentException: A SPI class of type
> org.apache.lucene.codecs.PostingsFormat with name 'Pulsing40' does not
> exist. You need to add the corresponding JAR file supporting this SPI to
> your classpath.The current classpath supports the following names:
> [Lucene40, Lucene41, Pulsing41, SimpleText, Memory, BloomFilter, Direct]
>
> Thanks,
>
> Sean
>
>
> On Tue, Jan 29, 2013 at 2:53 PM, Michael McCandless <
> lucene@mikemccandless.com> wrote:
>
>> Pulsing41PostingsFormat was just moved out of core to the "codecs" module.
>>
>> Still, the worst case (had it been deleted) would be to revive the
>> code from the past release and put it in your classpath, so old
>> indices could be read.
>>
>> Mike McCandless
>>
>> http://blog.mikemccandless.com
>>
>> On Tue, Jan 29, 2013 at 5:48 PM, Sean Bridges <se...@gmail.com>
>> wrote:
>> > Hello,
>> >
>> > We are trying to upgrade from lucene 4.0 to 4.1.  Our indexes were
>> written
>> > using Pulsing40PostingsFormat, which doesn't seem to be supported in 4.1.
>> >  For writing new indexes, we can switch to Pulsing41PostingsFormat, but
>> is
>> > there an easy way to read our old indexes using Lucene 4.1?
>> >
>> > What are the best practices for compatibility when using
>> > PostingFormat/Codecs.  Pulsing40PostingsFormat was marked @experimental,
>> so
>> > perhaps we shouldn't have used it.  But every PostingFormat/Codec shipped
>> > in 4.1 is either @experimental or @deprecated.
>> >
>> > Thanks,
>> >
>> > Sean
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Pulsing40PostingsFormat in lucene 4.1

Posted by Sean Bridges <se...@gmail.com>.
Do I need the Pulsing40PostingsFormat class to read my indexes though?
Pulsing40PostingsFormat isn't shipped with lucene 4.1.

I have index files with names like _0_Pulsing40_0.frq.  When I try to open
my index I get,

java.lang.IllegalArgumentException: A SPI class of type
org.apache.lucene.codecs.PostingsFormat with name 'Pulsing40' does not
exist. You need to add the corresponding JAR file supporting this SPI to
your classpath.The current classpath supports the following names:
[Lucene40, Lucene41, Pulsing41, SimpleText, Memory, BloomFilter, Direct]

Thanks,

Sean


On Tue, Jan 29, 2013 at 2:53 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> Pulsing41PostingsFormat was just moved out of core to the "codecs" module.
>
> Still, the worst case (had it been deleted) would be to revive the
> code from the past release and put it in your classpath, so old
> indices could be read.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Tue, Jan 29, 2013 at 5:48 PM, Sean Bridges <se...@gmail.com>
> wrote:
> > Hello,
> >
> > We are trying to upgrade from lucene 4.0 to 4.1.  Our indexes were
> written
> > using Pulsing40PostingsFormat, which doesn't seem to be supported in 4.1.
> >  For writing new indexes, we can switch to Pulsing41PostingsFormat, but
> is
> > there an easy way to read our old indexes using Lucene 4.1?
> >
> > What are the best practices for compatibility when using
> > PostingFormat/Codecs.  Pulsing40PostingsFormat was marked @experimental,
> so
> > perhaps we shouldn't have used it.  But every PostingFormat/Codec shipped
> > in 4.1 is either @experimental or @deprecated.
> >
> > Thanks,
> >
> > Sean
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Pulsing40PostingsFormat in lucene 4.1

Posted by Michael McCandless <lu...@mikemccandless.com>.
Pulsing41PostingsFormat was just moved out of core to the "codecs" module.

Still, the worst case (had it been deleted) would be to revive the
code from the past release and put it in your classpath, so old
indices could be read.

Mike McCandless

http://blog.mikemccandless.com

On Tue, Jan 29, 2013 at 5:48 PM, Sean Bridges <se...@gmail.com> wrote:
> Hello,
>
> We are trying to upgrade from lucene 4.0 to 4.1.  Our indexes were written
> using Pulsing40PostingsFormat, which doesn't seem to be supported in 4.1.
>  For writing new indexes, we can switch to Pulsing41PostingsFormat, but is
> there an easy way to read our old indexes using Lucene 4.1?
>
> What are the best practices for compatibility when using
> PostingFormat/Codecs.  Pulsing40PostingsFormat was marked @experimental, so
> perhaps we shouldn't have used it.  But every PostingFormat/Codec shipped
> in 4.1 is either @experimental or @deprecated.
>
> Thanks,
>
> Sean

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org