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

Dawid Weiss commented on LUCENE-10057:
--------------------------------------

Uwe:
{code}
To fix the demo issue: In KNNVectorDict demo application should use 
FSDirectory.open() instead of lowlevel code with FileChannel. Then open the 
file as IndexInput and call randomAccessSlice() on it 
(<https://lucene.apache.org/core/8_9_0/core/org/apache/lucene/store/IndexInput.html#randomAccessSlice-long-long->).
 Then you can read the values using RandomAccessInput#getXY: 
https://lucene.apache.org/core/8_9_0/core/org/apache/lucene/store/RandomAccessInput.html
 (which uses MMap behind scenes, if it is an MMapDirectory or on unsupported 
platform like 32 bit it will use the other directory implementations).
{code}

> Replace direct mmaped buffer with Lucene abstractions in KnnVectorDict
> ----------------------------------------------------------------------
>
>                 Key: LUCENE-10057
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10057
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Dawid Weiss
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to