You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by Vijay Santhanam <vi...@spectrumwired.com> on 2007/06/15 05:21:31 UTC
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
http://www.spectrumwired.com/images/spacer.gif
http://www.spectrumwired.com/images/spacer.gif
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: <http://www.spectrumwired.com> www.spectrumwired.com
http://www.spectrumwired.com/images/email_sig_logo_2.gif
http://www.spectrumwired.com/images/spacer.gif
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.
Re: Lucene.Net 2.0 and Regex Query and Test Cases
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jun 15, 2007, at 1:13 AM, Vijay Santhanam wrote:
> Also, "Lucene in Action" has been a great help on 1.9. Is there a new
> revision I can buy for 2.0/1?
Not yet. A 2nd edition is planned, but still unstarted. Things are
moving so fast with Java Lucene that it is hard to pick a starting
point! (and to carve out time away from family/work to dig into it).
Erik
RE: Lucene.Net 2.0 and Regex Query and Test Cases
Posted by Vijay Santhanam <vi...@spectrumwired.com>.
"[QueryParser.Parse] was removed in Java Lucene because more and more
settings (via
setters) were added, but those only applied to QueryParser
instances. It was confusing to some users who would construct an
instance, set some parameters, then call the static parse method."
Thanks Erik. The confusion is understandable.
Also, "Lucene in Action" has been a great help on 1.9. Is there a new
revision I can buy for 2.0/1?
Vijay Santhanam
B.Eng.(Soft.)
Spectrum Wired - Software Engineer
-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
Sent: Friday, 15 June 2007 3:04 PM
To: lucene-net-dev@incubator.apache.org
Subject: Re: Lucene.Net 2.0 and Regex Query and Test Cases
On Jun 14, 2007, at 11:21 PM, Vijay Santhanam wrote:
> 1. Static QueryParser.Parse is gone L What was the reasoning
> behind this? I upgraded all my QueryParser.Parse calls
This was removed in Java Lucene because more and more settings (via
setters) were added, but those only applied to QueryParser
instances. It was confusing to some users who would construct an
instance, set some parameters, then call the static parse method.
Erik
__________ NOD32 2220 (20070426) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
Re: Lucene.Net 2.0 and Regex Query and Test Cases
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jun 14, 2007, at 11:21 PM, Vijay Santhanam wrote:
> 1. Static QueryParser.Parse is gone L What was the reasoning
> behind this? I upgraded all my QueryParser.Parse calls
This was removed in Java Lucene because more and more settings (via
setters) were added, but those only applied to QueryParser
instances. It was confusing to some users who would construct an
instance, set some parameters, then call the static parse method.
Erik
RE: Lucene.Net 2.0 and Regex Query and Test Cases
Posted by Vijay Santhanam <vi...@spectrumwired.com>.
Hi Digy,
Thanks for your advice.
The patch didn't come through the mailing list. Is there a site I can copy
it from?
Cheers,
-Vijay Santhanam
http://www.spectrumwired.com/images/spacer.gif
http://www.spectrumwired.com/images/spacer.gif
From: Digy [mailto:digydigy@gmail.com]
Sent: Saturday, 16 June 2007 2:39 AM
To: lucene-net-dev@incubator.apache.org
Subject: RE: Lucene.Net 2.0 and Regex Query and Test Cases
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.
__________ NOD32 2220 (20070426) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
RE: Lucene.Net 2.0 and Regex Query and Test Cases
Posted by Digy <di...@gmail.com>.
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.