## org.apache.lucene.search
Class RandomSimilarityProvider

    java.lang.Object
      org.apache.lucene.search.similarities.Similarity
          org.apache.lucene.search.similarities.PerFieldSimilarityWrapper
              org.apache.lucene.search.RandomSimilarityProvider

    public class RandomSimilarityProvider

extends PerFieldSimilarityWrapper

Similarity implementation that randomizes Similarity implementations per-field.

The choices are 'sticky', so the selected algorithm is always used for the same field.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.lucene.search.similarities.Similarity
`Similarity.SimScorer, Similarity.SimWeight`

Constructor Summary
`RandomSimilarityProvider(Random random)`

Method Summary
`float` `coord(int overlap, int maxOverlap)`
`Similarity` `get(String field)`
`float` `queryNorm(float sumOfSquaredWeights)`
`String` `toString()`

Methods inherited from class org.apache.lucene.search.similarities.PerFieldSimilarityWrapper
`computeNorm, computeWeight, simScorer`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### RandomSimilarityProvider

    public RandomSimilarityProvider(Random random)

Method Detail

### coord

    public float coord(int overlap,
                       int maxOverlap)

  Overrides:
    `coord` in class `Similarity`

### queryNorm

    public float queryNorm(float sumOfSquaredWeights)

  Overrides:
    `queryNorm` in class `Similarity`

### get

    public Similarity get(String field)

  Specified by:
    `get` in class `PerFieldSimilarityWrapper`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.