You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Pierre-Luc Perron (Jira)" <ji...@apache.org> on 2020/04/11 11:41:00 UTC
[jira] [Comment Edited] (LUCENE-9314) Lucene monitor module uses
ByteBuffersDirectory rather than MemoryIndex when matching a single
document
[ https://issues.apache.org/jira/browse/LUCENE-9314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17081244#comment-17081244 ]
Pierre-Luc Perron edited comment on LUCENE-9314 at 4/11/20, 11:40 AM:
----------------------------------------------------------------------
Thanks for the feedback. I'll do it over the week end.
was (Author: pl.perron):
Thank for the feedback. I'll do it over the week end.
> 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
>
> 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: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org