You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Dawid Weiss (Jira)" <ji...@apache.org> on 2021/08/19 09:39:00 UTC

[jira] [Commented] (LUCENE-10057) Replace direct mmaped buffer with Lucene abstractions in KnnVectorDict

    [ 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: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org