lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Digy (JIRA)" <>
Subject [jira] Commented: (LUCENENET-103) Need to implement ICloneable on RAMDirectory
Date Wed, 17 Oct 2007 18:14:51 GMT


Digy commented on LUCENENET-103:

Hi Jon,

I tested the code you sent with some "additions and deletions into the original index and
checking the clones"  and it seems OK.
(Note: copying "sizeInBytes" field to clone is also needed).
(I prepared a patch for this but I am not sure  about sending this code, because I don't know
if this action results in a Copyright violation or  not.)

My Test results are:
using orgDir.Clone(false)  -> 3t
using orgDir.Clone(true)   -> 7t
using new RAMDirectory(orgDir) -> 9.5t 
with ~150,000 docs containing ~1,200,000 terms (t:100ms).

But I have some hesitations on applying the patch to Lucene.Net

First, although I couldn't generate an error in "Clone(false)" case, I think it can be dangerous
since it does not clone the byte array, instead just put the address into the buffer(and this
is the reason of speed-up).

Second, the original java-code from Nick Smith(Adding clone method to RAMDirectory+RAMFile)
is not included in the current release of the Java Lucene. Adding this functionality to Lucene.Net
means divergence from the Java code.

So I leave that hot potato for George Aroush(the only commiter of this project).


> Need to implement ICloneable on RAMDirectory
> --------------------------------------------
>                 Key: LUCENENET-103
>                 URL:
>             Project: Lucene.Net
>          Issue Type: Improvement
>         Environment: C# 2.0
>            Reporter: Jon Davis
>            Priority: Minor
> IClonable needs to be added to's RAMDirectory.
> See Lucene (Java) item resolution at: 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message