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

Paul Elschot commented on LUCENE-1410:
--------------------------------------

bq. .. we might be able to have some gains by allowing a directory to return an 
IntBufferIndexInput of some sort (separate from DataInput/IndexInput) that 
basically just positions an IntBuffer view (the default implementation would 
fill from an indexinput into a bytebuffer like we do now),

Since things are moving on the nio buffer front (see also LUCENE-2292), how 
about trying to be independent from the buffer implementation?
That might be done by allowing an IntBuffer wrapping a byte array or as view 
alongside a ByteBuffer, or temporary IntBuffer as above.

To be independent from the buffer implementation we could add some methods to 
IndexInput:

void startAlignToInt() // basically a seek to the next multiple of 4 byte when 
not already there. Could also start using an IntBuffer somehow.
int readAlignedInt() // get the next int, default to readInt(), use an 
IntBuffer when available.
void endAlignToInt() // switch back to byte reading, set the byte buffer to the 
the position corresponding to the int buffer.

(Adding this to DataInput seems to be a more natural place, but DataInput 
cannot seek.)

Would that work, and could it work fast?

> PFOR implementation
> -------------------
>
>                 Key: LUCENE-1410
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1410
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Index
>            Reporter: Paul Elschot
>            Priority: Minor
>             Fix For: Bulk Postings branch
>
>         Attachments: autogen.tgz, for-summary.txt, 
> LUCENE-1410-codecs.tar.bz2, LUCENE-1410.patch, LUCENE-1410.patch, 
> LUCENE-1410.patch, LUCENE-1410.patch, LUCENE-1410b.patch, LUCENE-1410c.patch, 
> LUCENE-1410d.patch, LUCENE-1410e.patch, TermQueryTests.tgz, TestPFor2.java, 
> TestPFor2.java, TestPFor2.java
>
>   Original Estimate: 21840h
>  Remaining Estimate: 21840h
>
> Implementation of Patched Frame of Reference.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to