lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Aroush" <geo...@aroush.net>
Subject RE: changes to Documents.Fields() in Lucene 1.9
Date Tue, 10 Oct 2006 03:01:36 GMT
Hi Jon,

Unfortunately, it didn't -- I don't know why; I must have over looked it.
It's not in 1.9 either, but it is in 2.0!

I have to issue a new release of 1.9 and 1.9.1 so I will fix it before I
release those new versions.

Regards,

-- George Aroush


-----Original Message-----
From: Jon Palmer [mailto:jpalmer@contactnetworks.com] 
Sent: Monday, October 09, 2006 6:20 PM
To: lucene-net-dev@incubator.apache.org
Subject: RE: changes to Documents.Fields() in Lucene 1.9

Did this change not make it into 1.9.1 final?

Jon



-----Original Message-----
From: George Aroush [mailto:george@aroush.net]
Sent: Tuesday, July 11, 2006 2:35 PM
To: lucene-net-dev@incubator.apache.org
Subject: RE: changes to Documents.Fields() in Lucene 1.9

Hi Jon,

Thanks for the feedback.  Two things changed:

1) "fields" -- this used to be public, it is now internal.  It was wrong for
it to be public.

2) Fields() -- you are right.  We should just return "fields" (no
casting.)
Lets give 1.9 another week or so till the "dust settles down" this way I can
make one release instead of multiples for 1.9.

Regards,

-- George

-----Original Message-----
From: Jon Palmer [mailto:jpalmer@contactnetworks.com]
Sent: Tuesday, July 11, 2006 1:25 PM
To: lucene-net-dev@incubator.apache.org
Subject: changes to Documents.Fields() in Lucene 1.9

I've just upgraded to 1.9 (congrats to everyone involved in the release)

 

I'm coming up against some issues with Document.Fields()

 

With the previous release their was a property Document.fields returning and
IList of all the fields in a given Document. This was nice because I could
do things like

 

int count = doc.fields.Count

 

 

or

 

foreach(Field field in doc.fields)

 

 

However with the removal of the fields property we now have to rely on
doc.Fields(). In 1.9 doc.Fields() is changed to return a
System.Collections.IEnumerator object which cannot be use in a foreach loop
rather than a System.Collections.IEnumerableobject. I understand that in
Java, with no foreach loops the Enumerator is about as useful as the actual
object but in.Net why does Fields() not return an object of type
System.Collections.IEnumerable. i.e. the code in Document.cs would just
be:

 

            /// <summary>Returns an Enumeration of all the fields in a
document. </summary>

            public System.Collections.IEnumerable Fields()

            {

                  return fields;

            }

 

Or maybe just 

 

            public System.Collections.IEnumerable Fields

            {

                  get

{

                        return fields;

}

            }

 

 

 

Many thanks,

Jon

 

 

            




Mime
View raw message