You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Digy (JIRA)" <ji...@apache.org> on 2009/11/14 11:05:39 UTC
[jira] Created: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
TestIndexReaderReopen.TestMixedReaders
--------------------------------------
Key: LUCENENET-247
URL: https://issues.apache.org/jira/browse/LUCENENET-247
Project: Lucene.Net
Issue Type: Bug
Environment: 2.9.0
Reporter: Digy
Attachments: TestIndexReaderReopen.patch
After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "George Aroush (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778029#action_12778029 ]
George Aroush commented on LUCENENET-247:
-----------------------------------------
Really nice work DIGY!
I have few change request below. The first one is to keep logical flow consistant with Java Lucene, the rest are just minor cleanup to reduce delta noise for next ports.
0) IndexReader.cs -- the "if" check that you added to the method IndexExists() can lead to behavior difference if GetCurrentSegmentGeneration() logic is changed in the feature. So, can you modify your current change:
public static bool IndexExists(System.IO.FileInfo directory)
{
+ if (System.IO.Directory.Exists(directory.FullName) == false) return false;
return SegmentInfos.GetCurrentSegmentGeneration(System.IO.Directory.GetFileSystemEntries(directory.FullName)) != - 1;
}
To:
public static bool IndexExists(System.IO.FileInfo directory)
{
+ System.String[] list = null;
+ if (System.IO.Directory.Exists(directory.FullName)) list = System.IO.Directory.GetFileSystemEntries(directory.FullName);
return SegmentInfos.GetCurrentSegmentGeneration(list) != - 1;
}
This will move back the decision of what to do (if the list is empty) back to GetCurrentSegmentGeneration(). Thus, it will keep the logical flow consistent with Java Lucene (in case GetCurrentSegmentGeneration() changes in the feature).
The rest are cleanup work.
1) DirectoryReader.cs -- please remove:
+ //// Sync all files we just wrote
+ //System.Collections.IEnumerator it = segmentInfos.Files(directory, false).GetEnumerator();
+ //while (it.MoveNext())
+ //{
+ // System.String fileName = (string)((System.Collections.DictionaryEntry) it.Current).Value;
+ // if (!synced.ContainsKey(fileName))
+ // {
+ // System.Diagnostics.Debug.Assert(directory.FileExists(fileName));
+ // directory.Sync(fileName);
+ // SupportClass.CollectionsHelper.AddIfNotContains(synced, fileName);
+ // }
+ //}
2) DirectoryReader.cs -- please remove:
+ //files = System.Collections.ArrayList.ReadOnly(new System.Collections.ArrayList(infos.Files(dir, true)));
3) DirectoryReader.cs -- please remove:
+ //lastFiles.Add(segmentInfos.Files(directory, false));
3) DirectoryReader.cs -- please remove:
+ //lastFiles.Add(docWriterFiles);
4) DirectoryReader.cs -- please remove:
+ //files = System.Collections..ArrayList.ReadOnly(new System.Collections.ArrayList(segmentInfos.Files(directory, true)));
5) ParallelReader.cs -- please remove:
+ //SupportClass.CollectionsHelper.AddAll(fieldSet, names);
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Attachments: Big.patch, Big2.patch, Big3.patch, Big4.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777945#action_12777945 ]
Digy commented on LUCENENET-247:
--------------------------------
Summary:
Index.TestIndexReader.*
Index.TestIndexReaderReopen.*
Index.TestBackwardsCompatibility.*
Index.TestCompoundFile.*
Index.TestFieldsReader.*
DIGY
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Attachments: Big.patch, Big2.patch, Big3.patch, Big4.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy updated LUCENENET-247:
---------------------------
Attachment: TestIndexReaderReopen.patch
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Attachments: TestIndexReaderReopen.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy updated LUCENENET-247:
---------------------------
Attachment: Big4.patch
"Big4" covers all previous patches. All tests of TestFieldsReader pass now.
DIGY
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Attachments: Big.patch, Big2.patch, Big3.patch, Big4.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy updated LUCENENET-247:
---------------------------
Attachment: Big3.patch
"Big3" covers all previous patches. TestCompoundFile.TestReadAfterClose passes now.
DIGY
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Attachments: Big.patch, Big2.patch, Big3.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy updated LUCENENET-247:
---------------------------
Attachment: Big.patch
My cleanup ended up with a huge patch. But now All tests TestIndexReader & TestIndexReaderReopen pass.
DIGY
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Attachments: Big.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy updated LUCENENET-247:
---------------------------
Attachment: (was: TestIndexReaderReopen.patch)
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778085#action_12778085 ]
Digy edited comment on LUCENENET-247 at 11/15/09 12:02 PM:
-----------------------------------------------------------
I commited the patch including George's suggections.
DIGY
was (Author: digydigy):
I commited the patch including with George's suggections.
DIGY
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Assignee: Digy
> Attachments: Big.patch, Big2.patch, Big3.patch, Big4.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy updated LUCENENET-247:
---------------------------
Attachment: TestIndexReaderReopen.patch
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Attachments: TestIndexReaderReopen.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777945#action_12777945 ]
Digy edited comment on LUCENENET-247 at 11/14/09 3:31 PM:
----------------------------------------------------------
Summary (81 Tests):
Index.TestIndexReader.*
Index.TestIndexReaderReopen.*
Index.TestBackwardsCompatibility.*
Index.TestCompoundFile.*
Index.TestFieldsReader.*
DIGY
was (Author: digydigy):
Summary:
Index.TestIndexReader.*
Index.TestIndexReaderReopen.*
Index.TestBackwardsCompatibility.*
Index.TestCompoundFile.*
Index.TestFieldsReader.*
DIGY
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Attachments: Big.patch, Big2.patch, Big3.patch, Big4.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy updated LUCENENET-247:
---------------------------
Attachment: (was: TestIndexReaderReopen.patch)
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Attachments: Big.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy updated LUCENENET-247:
---------------------------
Attachment: Big2.patch
This patch(big2) covers "big" and all tests of TestBackwardsCompatibility pass also.
DIGY
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Attachments: Big.patch, Big2.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (LUCENENET-247)
TestIndexReaderReopen.TestMixedReaders
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy closed LUCENENET-247.
--------------------------
Resolution: Fixed
Assignee: Digy
I commited the patch including with George's suggections.
DIGY
> TestIndexReaderReopen.TestMixedReaders
> --------------------------------------
>
> Key: LUCENENET-247
> URL: https://issues.apache.org/jira/browse/LUCENENET-247
> Project: Lucene.Net
> Issue Type: Bug
> Environment: 2.9.0
> Reporter: Digy
> Assignee: Digy
> Attachments: Big.patch, Big2.patch, Big3.patch, Big4.patch
>
>
> After I hit the standart type casting error "Can not cast System.Collections.DictionaryEntry to string" , I decided to clean up the GetFieldNames functions a bit.
> In some locations where a string is expected, there is a DictionaryEntry whose key contains another DictionaryEntry which in turns contains a string.
> DIGY
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.