[ 
https://issues.apache.org/jira/browse/LUCENE-9314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre-Luc Perron updated LUCENE-9314:
--------------------------------------
    Attachment: LUCENE-9314.patch

> Lucene monitor module uses ByteBuffersDirectory rather than MemoryIndex when 
> matching a single document
> -------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-9314
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9314
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/other
>    Affects Versions: 8.2, 8.3, 8.4, 8.5
>            Reporter: Pierre-Luc Perron
>            Priority: Minor
>              Labels: easyfix, performance, pull-request-available
>         Attachments: LUCENE-9314.patch
>
>
> Lucene monitor function, [match single 
> document|https://github.com/apache/lucene-solr/blob/e376582e25d02f85b415eb1c0456f3fdc800fc84/lucene/monitor/src/java/org/apache/lucene/monitor/Monitor.java#L276],
>  wraps a single document into a array of documents. Hence, it always calls 
> the function, [match many 
> documents|https://github.com/apache/lucene-solr/blob/e376582e25d02f85b415eb1c0456f3fdc800fc84/lucene/monitor/src/java/org/apache/lucene/monitor/Monitor.java#L256],
>   which build a 
> [MultiDocumentBatch|https://github.com/apache/lucene-solr/blob/71d335ff688982cef10a648c914623c81ceeeeed/lucene/monitor/src/java/org/apache/lucene/monitor/DocumentBatch.java#L56]
>  rather than a 
> [SingletonDocumentBatch|https://github.com/apache/lucene-solr/blob/71d335ff688982cef10a648c914623c81ceeeeed/lucene/monitor/src/java/org/apache/lucene/monitor/DocumentBatch.java#L46].
>  The former uses ByteBuffersDirectory while later uses MemoryIndex.
> As per documentation, 
> [MemoryIndex|https://lucene.apache.org/core/8_2_0/memory/index.html] is a 
> high-performance single-document main memory Apache Lucene fulltext search 
> index. Hence, Lucene monitor should use it when matching a single document.
> The patch routes [match single 
> document|https://github.com/apache/lucene-solr/blob/e376582e25d02f85b415eb1c0456f3fdc800fc84/lucene/monitor/src/java/org/apache/lucene/monitor/Monitor.java#L276]
>  to a SingletonDocumentBatch.



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

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

Reply via email to