Re: [Lucene.Net] [jira] [Commented] (LUCENENET-412) Replacing ArrayLists, Hashtables etc. with appropriate Generics.

2011-05-20 Thread Andy Pook
It'd be useful if There was a StopAnalyzer ctor overload that took an
IEnumerablestring and maybe the current one that takes Liststring should
be ICollectionstring (same as internal stopWords member).
Just gives a little flexibility on the types that can be used.

Also there is a little confusion around the treatment of the various
collection types. i.e. string[] gets converted to  a CharArraySet. Why not
just a Liststring ?

Thoughts?

Cheers,
  Andy

On 18 May 2011 23:20, Digy (JIRA) j...@apache.org wrote:


[
 https://issues.apache.org/jira/browse/LUCENENET-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13035795#comment-13035795]

 Digy commented on LUCENENET-412:
 

 Hi All,

 Lucene.Net 2.9.4g is almost ready for testing  feedbacks.

 While injecting generics  making some clean up in code, I tried to be
 close to lucene 3.0.3 as much as possible.
 Therefore it's position is somewhere between lucene.Java 2.9.4  3.0.3

 DIGY


 PS: For those who might want to try this version:
 It won't probably be a drop-in replacement since there are a few API
 changes like
 - StopAnalyzer(Liststring stopWords)
 - Query.ExtractTerms(ICollectionstring)
 - TopDocs.*TotalHits*, TopDocs.*ScoreDocs*
 and some removed methods/classes like
 - Filter.Bits
 - JustCompileSearch
 - Contrib/Similarity.Net




  Replacing ArrayLists, Hashtables etc. with appropriate Generics.
  
 
  Key: LUCENENET-412
  URL: https://issues.apache.org/jira/browse/LUCENENET-412
  Project: Lucene.Net
   Issue Type: Improvement
 Affects Versions: Lucene.Net 2.9.4
 Reporter: Digy
 Priority: Minor
  Fix For: Lucene.Net 2.9.4
 
  Attachments: IEquatable for QuerySubclasses.patch,
 LUCENENET-412.patch, lucene_2.9.4g_exceptions_fix
 
 
  This will move Lucene.Net.2.9.4 closer to lucene.3.0.3 and allow some
 performance gains.

 --
 This message is automatically generated by JIRA.
 For more information on JIRA, see: http://www.atlassian.com/software/jira



Re: [Lucene.Net] [jira] [Commented] (LUCENENET-412) Replacing ArrayLists, Hashtables etc. with appropriate Generics.

2011-05-20 Thread digy digy
On Fri, May 20, 2011 at 12:34 PM, Andy Pook andy.p...@gmail.com wrote:

 It'd be useful if There was a StopAnalyzer ctor overload that took an
 IEnumerablestring and maybe the current one that takes Liststring
 should
 be ICollectionstring (same as internal stopWords member).
 Just gives a little flexibility on the types that can be used.


I changed Liststring to ICollectionstring


 Also there is a little confusion around the treatment of the various
 collection types. i.e. string[] gets converted to  a CharArraySet. Why not
 just a Liststring ?


So is it in lucene.java



 Thoughts?

 Cheers,
  Andy


DIGY



 On 18 May 2011 23:20, Digy (JIRA) j...@apache.org wrote:

 
 [
 
 https://issues.apache.org/jira/browse/LUCENENET-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13035795#comment-13035795
 ]
 
  Digy commented on LUCENENET-412:
  
 
  Hi All,
 
  Lucene.Net 2.9.4g is almost ready for testing  feedbacks.
 
  While injecting generics  making some clean up in code, I tried to be
  close to lucene 3.0.3 as much as possible.
  Therefore it's position is somewhere between lucene.Java 2.9.4  3.0.3
 
  DIGY
 
 
  PS: For those who might want to try this version:
  It won't probably be a drop-in replacement since there are a few API
  changes like
  - StopAnalyzer(Liststring stopWords)
  - Query.ExtractTerms(ICollectionstring)
  - TopDocs.*TotalHits*, TopDocs.*ScoreDocs*
  and some removed methods/classes like
  - Filter.Bits
  - JustCompileSearch
  - Contrib/Similarity.Net
 
 
 
 
   Replacing ArrayLists, Hashtables etc. with appropriate Generics.
   
  
   Key: LUCENENET-412
   URL:
 https://issues.apache.org/jira/browse/LUCENENET-412
   Project: Lucene.Net
Issue Type: Improvement
  Affects Versions: Lucene.Net 2.9.4
  Reporter: Digy
  Priority: Minor
   Fix For: Lucene.Net 2.9.4
  
   Attachments: IEquatable for QuerySubclasses.patch,
  LUCENENET-412.patch, lucene_2.9.4g_exceptions_fix
  
  
   This will move Lucene.Net.2.9.4 closer to lucene.3.0.3 and allow some
  performance gains.
 
  --
  This message is automatically generated by JIRA.
  For more information on JIRA, see:
 http://www.atlassian.com/software/jira
 



Re: [Lucene.Net] [jira] [Commented] (LUCENENET-412) Replacing ArrayLists, Hashtables etc. with appropriate Generics.

2011-05-18 Thread Alexander Bauer


Can i use this version with an existing index based on lucene.Java 3.0.3 ?

Alex


Am 19.05.2011 00:20, schrieb Digy (JIRA):

 [ 
https://issues.apache.org/jira/browse/LUCENENET-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13035795#comment-13035795
 ]

Digy commented on LUCENENET-412:


Hi All,

Lucene.Net 2.9.4g is almost ready for testing  feedbacks.

While injecting generics  making some clean up in code, I tried to be close to 
lucene 3.0.3 as much as possible.
Therefore it's position is somewhere between lucene.Java 2.9.4  3.0.3

DIGY


PS: For those who might want to try this version:
It won't probably be a drop-in replacement since there are a few API changes 
like
- StopAnalyzer(Liststring  stopWords)
- Query.ExtractTerms(ICollectionstring)
- TopDocs.*TotalHits*, TopDocs.*ScoreDocs*
and some removed methods/classes like
- Filter.Bits
- JustCompileSearch
- Contrib/Similarity.Net





Replacing ArrayLists, Hashtables etc. with appropriate Generics.


 Key: LUCENENET-412
 URL: https://issues.apache.org/jira/browse/LUCENENET-412
 Project: Lucene.Net
  Issue Type: Improvement
Affects Versions: Lucene.Net 2.9.4
Reporter: Digy
Priority: Minor
 Fix For: Lucene.Net 2.9.4

 Attachments: IEquatable for QuerySubclasses.patch, 
LUCENENET-412.patch, lucene_2.9.4g_exceptions_fix


This will move Lucene.Net.2.9.4 closer to lucene.3.0.3 and allow some 
performance gains.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira





Re: [Lucene.Net] [jira] [Commented] (LUCENENET-412) Replacing ArrayLists, Hashtables etc. with appropriate Generics.

2011-05-17 Thread Rory Plaire
This is a great improvement, but why not also remove the braces and returns?


var cache = new FilterCacheDocIdSet(deletesMode,
  (reader, docIdSet) = new FilteredDocIdSet(
   (DocIdSet)docIdSet, docid = !reader.IsDeleted(docid)));


On Tue, May 17, 2011 at 3:01 PM, Digy (JIRA) j...@apache.org wrote:


[
 https://issues.apache.org/jira/browse/LUCENENET-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13035092#comment-13035092]

 Digy commented on LUCENENET-412:
 

 One more sample
 {code}
 From:
class AnonymousFilterCache : FilterCache
{
class AnonymousFilteredDocIdSet : FilteredDocIdSet
{
IndexReader r;
public AnonymousFilteredDocIdSet(DocIdSet innerSet,
 IndexReader r) : base(innerSet)
{
this.r = r;
}
public override bool Match(int docid)
{
return !r.IsDeleted(docid);
}
}

public AnonymousFilterCache(DeletesMode deletesMode) :
 base(deletesMode)
{
}

protected  override object MergeDeletes(IndexReader reader,
 object docIdSet)
{
return new
 AnonymousFilteredDocIdSet((DocIdSet)docIdSet, reader);
}
}
...
cache = new AnonymousFilterCache(deletesMode);



 To:
cache = new FilterCacheDocIdSet(deletesMode,
(reader,docIdSet)={
return new FilteredDocIdSet((DocIdSet)docIdSet,
(docid) =
{
return !reader.IsDeleted(docid);
});
 });
 {code}

 DIGY

  Replacing ArrayLists, Hashtables etc. with appropriate Generics.
  
 
  Key: LUCENENET-412
  URL: https://issues.apache.org/jira/browse/LUCENENET-412
  Project: Lucene.Net
   Issue Type: Improvement
 Affects Versions: Lucene.Net 2.9.4
 Reporter: Digy
 Priority: Minor
  Fix For: Lucene.Net 2.9.4
 
  Attachments: IEquatable for QuerySubclasses.patch,
 LUCENENET-412.patch, lucene_2.9.4g_exceptions_fix
 
 
  This will move Lucene.Net.2.9.4 closer to lucene.3.0.3 and allow some
 performance gains.

 --
 This message is automatically generated by JIRA.
 For more information on JIRA, see: http://www.atlassian.com/software/jira