Robert, 

It's used to serialize similarity factories.  See getNamedPropertyValues() just 
below.

There are tests for similarity factory classes of the form 
"solr.<SimpleFactoryClassName>", e.g. TestSweetSpotSimilarityFactory, which 
uses solr/core/src/test-files/solr/collection1/conf/schema-sweetspot.xml, which 
declares:

  <similarity class="solr.SchemaSimilarityFactory"/>

When you say "that's not even the package where our similarity factories go", 
to which package are you referring?

See IndexSchema.readSimilarity() for how it can work.

Steve

On Mar 25, 2013, at 12:44 AM, Robert Muir <[email protected]> wrote:

> On Mon, Mar 25, 2013 at 12:29 AM,  <[email protected]> wrote:
>> 
>> Modified: 
>> lucene/dev/trunk/solr/core/src/java/org/apache/solr/schema/SimilarityFactory.java
>> URL: 
>> http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/schema/SimilarityFactory.java?rev=1460519&r1=1460518&r2=1460519&view=diff
>> ==============================================================================
>> --- 
>> lucene/dev/trunk/solr/core/src/java/org/apache/solr/schema/SimilarityFactory.java
>>  (original)
>> +++ 
>> lucene/dev/trunk/solr/core/src/java/org/apache/solr/schema/SimilarityFactory.java
>>  Mon Mar 25 04:29:33 2013
>> +
>> +  private static String normalizeSPIname(String fullyQualifiedName) {
>> +    if (fullyQualifiedName.startsWith("org.apache.lucene.") || 
>> fullyQualifiedName.startsWith("org.apache.solr.")) {
>> +      return "solr" + 
>> fullyQualifiedName.substring(fullyQualifiedName.lastIndexOf('.'));
>> +    }
> 
> I dont know what this is used for: but i don't see how it can be
> correct. Thats not even the package where our similarity factories
> go... and i think if you normalize this and then try to go back, it
> wont work.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to