lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Digy" <digyd...@gmail.com>
Subject RE: Lucene.Net 2.0 and Regex Query and Test Cases
Date Fri, 15 Jun 2007 16:38:49 GMT
Hi Vijay,

 

1-      I recently found a bug in SegmentInfos.Clone method(Lucene.NET 2.1).
It still works in my small test cases but there may be more bugs. Therefore
i would recommend not to use it in a production environment yet. I think
version 2.0.0.4 is a better decision when considering stability.

 

                

2-      I use IndexModifier to "Update" the document. But as mentioned below

(
http://lucene.apache.org/java/1_9_0/api/org/apache/lucene/index/IndexModifie
r.html

 "While you can freely mix calls to add() and delete() using this class, you
should batch you calls for best performance. For example, if you want to
update 20 documents, you should first delete all those documents, then add
all the new documents. " ) it has some performance drawbacks. Therefore  I
prepared  an  "UpdateDocument" method for IndexModifier where adding to
index is deferred until document count waiting to be indexed reaches
MaxWaitingDocsToBeIndexed(Default=20) or IndexModifier is closed.

 

I attach that patch to this eMail.

 

 

DIGY

 

 

From: Vijay Santhanam [mailto:vijay@spectrumwired.com] 
Sent: Friday, June 15, 2007 6:22 AM
To: lucene-net-dev@incubator.apache.org
Subject: Lucene.Net 2.0 and Regex Query and Test Cases

 

Hi Everyone,

 

I emailed George Aroush perhaps too prematurely as the ezlm took a while to
respond to my subscription request.

Please accept my apology George for my unsolicited, unexpected email.

 

This mailing list is a better place to get my questions answered.

 

First off, I'm having so much fun using Lucene.Net and integrating it into
our clients projects. It's simplicity, flexibility and speed are
unparalleled by any other project out there.

 

Secondly, I'm not sure whether or not I should be discussing these issues
here or on the Java user list.

 

Thirdly, I'm looking for opportunities to contribute anything I write that
extends Lucene.Net or fixes issues or something.

 

Many other OSS projects that get ported to C# ideally want to be forked at
the low level (and even architecturally) to make use of all the cool things
C# has to offer; like attributes, reflection, etc. NUnit is a good example
of this.  I've written a small library that creates documents from classes
that have attributes on member fields defining how to store it (TermVector,
Indexed, etc) and what serializer/deserializer to use. I've created a small
set of serializers that compliment the Util classes. I'd love to discuss it
sometime if anyone else is interested.

 

Alas, I have more important issues to deal with.

Yesterday, I tried to upgrade from Lucene.Net 1.9rc1 to Lucene.Net 2.0 and
ran into a few problems.

 

 

1.       Static QueryParser.Parse is gone L What was the reasoning behind
this? I upgraded all my QueryParser.Parse calls

2.       MultiFieldQueryParser.Parse single field defaulting to SHOULD
Boolean clausing disappeared. 

i.e. public static Query Parse(System.String query, System.String[] fields,
Analyzer analyzer) is missing. I added this method that defaults to SHOULD
BooleanClause.Occur's. This was particularly annoying. Was there a reason
this was removed?

3.       The Lucene.Net/Source/Search/Regex and all containing Regex source
files have disappeared. They still exist in the java version, but not in
Lucene.Net. Was this intentionally excluded from the source and test cases?
Or, was this a simple mistake? To remedy the problem, I copied across the
v1.9 Regex. It seems to run fine, but I'm not sure why this was missing from
the trunk. 

 

I upgraded to 2.0 because the stable link on the Lucene.Net front page took
me to a 2.0 download page. Is 2.1 stable enough to use in production? 

IndexWriter.UpdateDocument() is a major reason I began the upgrade (which is
only in 2.1), because I can avoid instantiating the reader then the writer
to update a single document.

 

Thanks for a great port! I'm looking forward to contributing in some way.

 

Regards,

Vijay

 

 




Vijay Santhanam
B.Eng.(Soft.)
Spectrum Wired - Software Engineer

T: +61 2 4925 3266
F: +61 2 4925 3255
M: +61 407 525 087
W: www.spectrumwired.com 



Disclaimer: This email and any attached files are intended solely for the
named addressee, are confidential and may contain legally privileged
information. The copying or distribution of them or any information they
contain, by anyone other than the addressee, is prohibited. If you have
received this email in error, please let us know by telephone or return the
email to the sender and destroy all copies. Thank you. 

 

 

 


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message