lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Han Jiang (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (LUCENE-3892) Add a useful intblock postings format (eg, FOR, PFOR, PFORDelta, Simple9/16/64, etc.)
Date Thu, 05 Apr 2012 12:05:24 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-3892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247175#comment-13247175
] 

Han Jiang edited comment on LUCENE-3892 at 4/5/12 12:05 PM:
------------------------------------------------------------

Hi Mike,
I have changed my proposal a bit, but here are some questions here:

{quote}
* There are actually more than 2 codecs (eg we also have Lucene3x,
SimpleText, sep/intblock (abstract), random codecs/postings
formats for testing...), but our default codec now is Lucene40.
{quote}

Yes, but it seems that our baseline will be Lucene40 and Pulsing? Lucene3x is read-only, and
other approaches are not productive.
And, what is random codec? Does it mean to randomly pick up a codec for user?

{quote}
* I think you can use the existing abstract sep/intblock classes
(ie, they implement layers like FieldsProducer/Consumer...), and
then you can "just" implement the required methods (eg to
encode/decode one int[] block).
{quote}

And this was my initial thought about the PForDelta interface:

The class hierarchy will be as below (quite similar to pulsing):
* PForDeltaPostingsFormat(extends PostingsFormat): 
   	It will define global behaviors such as file suffix, and provide customized FieldsWriter/Reader
* PForDeltaFieldsWriter(extends FieldsConsumer): 
    	It will define how terms,docids,freq,offset are written into posting files.
    	inner classes include: 
** PForDeltaTermsConsumer(extends TermsConsumer)
** PForDeltaPostingsConsumer(extends PostingsConsumer)
* PForDeltaFieldsReader(extends FieldsProducer):
    	It will define how postings are read from index, and provide *Enum class to iterate docids,
freqs etc.
    	inner classes include:
** PForDeltaFieldsEnum(extends FieldsEnum)
** PForDeltaTermsEnum(extends TermsEnum)
** PForDeltaDocsEnum(extends DocsEnum)
** PForDeltaDocsAndPositonsEnum(extends DocsAndPostionsEnum)
** PForDeltaTerms(extends Terms)

It seems that "BlockTermsReader/Writer" have already implement those subclasses, and we can
just pass our Postings(Writer/Reader)Base as an argument, like PatchedFrameOfRefCodec::fieldsConsumer()
does.
Then, to introduce PForDeltaCodec into trunk, we should also introduce the "fixed codec"?
Also, why isn't lucene40codec implemented with this line? 

{quote}
* We may need to tune the skipper settings, based on profiling
results from skip-intensive (Phrase, And) queries... since it's
currently geared towards single-doc-at-once encoding. I don't think
we should try to make a new skipper impl here... (there is a separate
issue for that).
{quote}

I haven't investigated much about different kinds of queries. What are skipper settings? 

{quote}
* Maybe explore the combination of pulsing and PForDelta codecs;
seems like the combination of those two could be important, since
for low docFreq terms, retrieving the docs is now more
expensive...
{quote}

Yes, it seems that if PForDelta outperforms current approaches, a Pulsing version will work
better. This feature will also come as "phase 2".
                
      was (Author: billy):
    {quote}
* There are actually more than 2 codecs (eg we also have Lucene3x,
SimpleText, sep/intblock (abstract), random codecs/postings
formats for testing...), but our default codec now is Lucene40.
{quote}

Yes, but it seems that our baseline will be Lucene40 and Pulsing? Lucene3x is read-only, and
other approaches are not productive.
And, what is random codec? Does it mean to randomly pick up a codec for user?

{quote}
* I think you can use the existing abstract sep/intblock classes
(ie, they implement layers like FieldsProducer/Consumer...), and
then you can "just" implement the required methods (eg to
encode/decode one int[] block).
{quote}

And this was my initial thought about the PForDelta interface:

The class hierarchy will be as below (quite similar to pulsing):
* PForDeltaPostingsFormat(extends PostingsFormat): 
   	It will define global behaviors such as file suffix, and provide customized FieldsWriter/Reader
* PForDeltaFieldsWriter(extends FieldsConsumer): 
    	It will define how terms,docids,freq,offset are written into posting files.
    	inner classes include: 
** PForDeltaTermsConsumer(extends TermsConsumer)
** PForDeltaPostingsConsumer(extends PostingsConsumer)
* PForDeltaFieldsReader(extends FieldsProducer):
    	It will define how postings are read from index, and provide *Enum class to iterate docids,
freqs etc.
    	inner classes include:
** PForDeltaFieldsEnum(extends FieldsEnum)
** PForDeltaTermsEnum(extends TermsEnum)
** PForDeltaDocsEnum(extends DocsEnum)
** PForDeltaDocsAndPositonsEnum(extends DocsAndPostionsEnum)
** PForDeltaTerms(extends Terms)

It seems that "BlockTermsReader/Writer" have already implement those subclasses, and we can
just pass our Postings(Writer/Reader)Base as an argument, like PatchedFrameOfRefCodec::fieldsConsumer()
does.
Then, to introduce PForDeltaCodec into trunk, we should also introduce the "fixed codec"?
Also, why isn't lucene40codec implemented with this line? 

{quote}
* We may need to tune the skipper settings, based on profiling
results from skip-intensive (Phrase, And) queries... since it's
currently geared towards single-doc-at-once encoding. I don't think
we should try to make a new skipper impl here... (there is a separate
issue for that).
{quote}

I haven't investigated much about different kinds of queries. What are skipper settings? 

{quote}
* Maybe explore the combination of pulsing and PForDelta codecs;
seems like the combination of those two could be important, since
for low docFreq terms, retrieving the docs is now more
expensive...
{quote}

Yes, it seems that if PForDelta outperforms current approaches, a Pulsing version will work
better? This feature will also come as "phase 2".

                  
> Add a useful intblock postings format (eg, FOR, PFOR, PFORDelta, Simple9/16/64, etc.)
> -------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3892
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3892
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>              Labels: gsoc2012, lucene-gsoc-12
>             Fix For: 4.0
>
>
> On the flex branch we explored a number of possible intblock
> encodings, but for whatever reason never brought them to completion.
> There are still a number of issues opened with patches in different
> states.
> Initial results (based on prototype) were excellent (see
> http://blog.mikemccandless.com/2010/08/lucene-performance-with-pfordelta-codec.html
> ).
> I think this would make a good GSoC project.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message