Excellent! A suggestion for the Neo4J team: enhance the Index framework to allow the Map of property values that is passed to the index creation method to be propagated/passed to the constructor for custom analyzers.
Niels, there's a trick I use as a workaround, which is to set the parameters in a static class member in our wrapper prior to creating the Neo4J indices, then the no-arg constructor can use those parameters as needed. Hacky but functional. ________________________________________ From: user-boun...@lists.neo4j.org [user-boun...@lists.neo4j.org] On Behalf Of Niels Hoogeveen [pd_aficion...@hotmail.com] Sent: Friday, November 11, 2011 11:33 AM To: user@lists.neo4j.org Subject: Re: [Neo4j] Lucene sort with diacritic characters It works like a dream. One note for others needing this functionality. The ICUCollationKeyAnalyzer has a constructor which takes a Collator (from icu4j) as argument. Neo4j's index requires a constructor without arguments, so it's necessary to wrap the ICUCollationKeyAnalyzer and provide it the appropriate Collator in the constructor. For me Collator.SECONDARY was the best choice. Niels > From: rick.bullo...@thingworx.com > To: user@lists.neo4j.org > Date: Fri, 11 Nov 2011 07:33:44 -0700 > Subject: Re: [Neo4j] Lucene sort with diacritic characters > > You probably need to create a custom analyzer using one of Lucene's collation > filters (which you will provide as a parameter to the Neo4J index creation > method). Unfortunately, you can't apply a new analyzer "after the fact". I > think you'll need to delete and regenerate the index. Lucene has some > built-in language specific collation filters, but there is also a contributed > package, ICUCollationKeyFilter, which may have some advantages in terms of > performance. Unfortunately, I do not direct experience in using either, but > hopefully this will help get you pointed in the right direction. > > Rick > > > > ________________________________________ > From: user-boun...@lists.neo4j.org [user-boun...@lists.neo4j.org] On Behalf > Of Niels Hoogeveen [pd_aficion...@hotmail.com] > Sent: Friday, November 11, 2011 9:27 AM > To: user@lists.neo4j.org > Subject: Re: [Neo4j] Lucene sort with diacritic characters > > anyone? > > > From: pd_aficion...@hotmail.com > > To: user@lists.neo4j.org > > Date: Thu, 10 Nov 2011 20:20:46 +0100 > > Subject: [Neo4j] Lucene sort with diacritic characters > > > > > > When retrieving items from a Lucene index, using the sort method, it seems > > the order doesn't abide proper rules for sorting diacritic characters. > > For example, Århus comes later in the list than Zürich and Ḩalab comes > > later than Žužemberk. > > Can someone help me solve this? > > Niels > > _______________________________________________ > > Neo4j mailing list > > User@lists.neo4j.org > > https://lists.neo4j.org/mailman/listinfo/user > > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user