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

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

If you leave an unclosed mapped buffer then no - closing the original channel 
won't work. I think Uwe is right in that it's better to use Lucene's 
infrastructure - it provides long pointers, checksums, etc. 

What I'm not sure is how is the user supposed to run this thing? Here is the 
docs from IndexFiles:
{code}
IF DICT_PATH contains a KnnVector dictionary, the index will also support 
KnnVector search
{code}
(this is wrong now, by the way as it's a boolean trigger option now).

How does the user create the dictionary of knn vectors?  When you look at the 
test in TestDemo, it creates such dictionary from the example data prior to 
running IndexFiles... but KnnVectorDict is not called anywhere other than from 
tests?
{code}
  public void testKnnVectorSearch() throws Exception {
    Path dir = getDataPath("test-files/docs");
    Path indexDir = createTempDir("ContribDemoTest");

    Path vectorDictSource = 
getDataPath("test-files/knn-dict").resolve("knn-token-vectors");
    try (FSDirectory directory = FSDirectory.open(indexDir)) {
      KnnVectorDict.build(vectorDictSource, directory, IndexFiles.KNN_DICT);
    }

    IndexFiles.main(
        new String[] {
          "-create", "-docs", dir.toString(), "-index", indexDir.toString(), 
"-knn_dict"
        });
{code}

If I wanted to run those demos from command line, how can I prepare the knn 
dictionary?

> 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
>         Attachments: LUCENE-10057.patch
>
>




--
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