lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Granroth, Neal V." <>
Subject RE: [jira] Commented: (LUCENENET-42) Hits class should have a friendlier interface
Date Mon, 29 Dec 2008 19:02:26 GMT
We should be careful not to quickly close issues using a reason of "By Design".  Doing so usually
only serves to insult the issue submitter and does not indicate why the requested change cannot
be made.

While keeping close to the original Java code is a good general philosophy, we should make
use of the "better", more useful, interfaces available in .NET when we can.  Making Lucene.NET
as .NET friendly as possible and not forcing people who may be unfamiliar with Java to use
its sometimes awkward paradigms will help more developers adopt Lucene.NET and ensure the
project's survival.

For those who may not be aware, there was at least one JIRA issue about problems in earlier
versions of Lucene.NET with partially implemented or incorrectly implemented IEnumerable interfaces.
 In these situations .NET developers could write clearly valid code that would unexpectedly
fail when run due to differences between the Java and .NET paradigms.  One solution in these
situations is to eliminate the IEnumerable interface and force the developer to use the Java-style
method call.  Not a .NET friendly solution, but it works.

Perhaps we should consider a set of wrapper classes (adapter pattern) to isolate any Lucene.NET
augmentation from the core Lucene code?

-- Neal

-----Original Message-----
From: Tim Januario (JIRA) []
Sent: Wednesday, December 24, 2008 10:01 AM
Subject: [jira] Commented: (LUCENENET-42) Hits class should have a friendlier interface


Tim Januario commented on LUCENENET-42:

Copied from my comments on LUCENENET-43:
I agree with you George on this subject. The philosophy of the project is to make the port
as close as possible to the java source which has huge benefits moving forward as new releases
are made and need porting. Once divergences are made, it will not be possible to simply compare
two branches of the java code in order to identify the changes that need to be made to the
Lucene.Net code. In keeping with this philosophy, it would be beneficial to those of us who
are watching these threads to close the issues as "By Design" in order to not cause clutter.

> Hits class should have a friendlier interface
> ---------------------------------------------
>                 Key: LUCENENET-42
>                 URL:
>             Project: Lucene.Net
>          Issue Type: Improvement
>            Reporter: Simone Busoli
>            Priority: Trivial
> Retrieving the information about each hit is not very straightforward. It is actually
implemented as a method - Hits.Doc(i) - but .NET provides indexers which are much more usable,
that is, Hits[i]. Furthermore it should be made easier to iterate through hits, implementing
the IEnumerable interface.

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

View raw message