[
https://issues.apache.org/jira/browse/LUCENE-9314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17093275#comment-17093275
]
ASF subversion and git services commented on LUCENE-9314:
---------------------------------------------------------
Commit 5d5b7e14d41e00671fc938ad0db7714d56bd455e in lucene-solr's branch
refs/heads/master from Alan Woodward
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=5d5b7e1 ]
LUCENE-9314: Use SingletonDocumentBatch in monitor when we only have a single
document
> 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-9314.patch, LUCENE-9314.patch,
> LUCENE-9314.patch
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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 builds 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: [email protected]
For additional commands, e-mail: [email protected]