[Lucene.Net] [jira] [Updated] (LUCENENET-459) Italian stemmer (from SnowballAnalyzer) does not work

2011-12-22 Thread Digy (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENENET-459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Digy updated LUCENENET-459:
---

Affects Version/s: Lucene.Net 2.9.4g
Fix Version/s: Lucene.Net 2.9.4g

> Italian stemmer (from SnowballAnalyzer) does not work
> -
>
> Key: LUCENENET-459
> URL: https://issues.apache.org/jira/browse/LUCENENET-459
> Project: Lucene.Net
>  Issue Type: Bug
>  Components: Lucene.Net Contrib
>Affects Versions: Lucene.Net 2.9.2, Lucene.Net 2.9.4, Lucene.Net 2.9.4g
>Reporter: Santiago M. Mola
> Fix For: Lucene.Net 2.9.4g
>
>
> Italian stemmer does not work.
> Consider this code:
>   var englishAnalyzer = new SnowballAnalyzer("English");
>   var tk = englishAnalyzer.TokenStream("text", new 
> StringReader("horses"));
>   var ta = 
> (TermAttribute)tk.GetAttribute(typeof(TermAttribute));
>   tk.IncrementToken();
>   Console.WriteLine("English stemmer: horses -> " + 
> ta.Term());
>   
>   var italianAnalyzer = new SnowballAnalyzer("Italian");
>   tk = italianAnalyzer.TokenStream("text", new 
> StringReader("abbandonata"));
>   ta = 
> (TermAttribute)tk.GetAttribute(typeof(TermAttribute));
>   tk.IncrementToken();
>   Console.WriteLine("Italian stemmer: abbandonata -> " + 
> ta.Term());
> It outputs:
> English stemmer: horses -> hors
> Italian stemmer: abbandonata -> abbandonata
> While Java Lucene 2.9.4 outputs:
> English stemmer: horses -> hors
> Italian stemmer: abbandonata -> abbandon

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[Lucene.Net] [jira] [Updated] (LUCENENET-448) GeoHashFilteredDocIdSet does not work at all

2011-11-01 Thread Digy (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENENET-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Digy updated LUCENENET-448:
---

Affects Version/s: (was: Lucene.Net 2.9.4)
   Lucene.Net 2.9.4g
Fix Version/s: (was: Lucene.Net 2.9.4)
   Lucene.Net 2.9.4g

> GeoHashFilteredDocIdSet does not work at all
> 
>
> Key: LUCENENET-448
> URL: https://issues.apache.org/jira/browse/LUCENENET-448
> Project: Lucene.Net
>  Issue Type: Bug
>  Components: Lucene.Net Contrib
>Affects Versions: Lucene.Net 2.9.4g
> Environment: Windows 7 x64
>Reporter: Jeff Johnson
>  Labels: contrib, spatial
> Fix For: Lucene.Net 2.9.4g
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The GeoHashFilteredDocIdSet is assuming the values are always in the cache 
> which is wrong. A proposed fix for the method is listed here for 
> GeoHashDistanceFilter.cs:
> public GeoHashFilteredDocIdSet(DocIdSet innerSet, string[] geoHashValues, 
> Dictionary distanceLookupCache, double lat, double lng, int 
> docBase, double distance, Dictionary distances) 
> : base(innerSet , (docid) => /* was: public override Match */
>   {
>   String geoHash = geoHashValues[docid];
>   double[] coords = GeoHashUtils.Decode(geoHash);
>   double x = coords[0];
>   double y = coords[1];
>   double cachedDistance;
> distanceLookupCache.TryGetValue(geoHash, out cachedDistance);
>   double d;
>   if (cachedDistance > 0)
>   {
>   d = cachedDistance;
>   }
>   else
>   {
>   d = 
> DistanceUtils.GetInstance().GetDistanceMi(lat, lng, x, y);
>   distanceLookupCache[geoHash] = d;
>   }
>   if (d < distance)
>   {
>   distances[docid + docBase] = d;
>   return true;
>   }
>   
>   return false;
>   })
>   {
>   _geoHashValues = geoHashValues;
>   _distances = distances;
>   _distance = distance;
>   _docBase = docBase;
>   _lng = lng;
>   _lat = lat;
>   _distanceLookupCache = distanceLookupCache;
>   }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira