Similarity.queryNorm
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.apache.lucene.search.Similarity.queryNorm (Showing top 5 results out of 315)

  • Common ways to obtain Similarity
private void myMethod () {
Similarity s =
  • Searcher searcher;searcher.getSimilarity()
  • Similarity.getDefault()
  • Smart code suggestions by Codota
}
origin: org.apache.lucene/lucene-core-jfrog

public float queryNorm(float sumOfSquaredWeights) {
 return delegee.queryNorm(sumOfSquaredWeights);
}
origin: org.apache.lucene/com.springsource.org.apache.lucene

public float queryNorm(float sumOfSquaredWeights) {
 return delegee.queryNorm(sumOfSquaredWeights);
}
origin: org.apache.lucene/lucene-core-jfrog

/** Expert: Constructs and initializes a Weight for a top-level query. */
public Weight weight(Searcher searcher)
 throws IOException {
 Query query = searcher.rewrite(this);
 Weight weight = query.createWeight(searcher);
 float sum = weight.sumOfSquaredWeights();
 float norm = getSimilarity(searcher).queryNorm(sum);
 weight.normalize(norm);
 return weight;
}
origin: lucene/lucene

/** Expert: Constructs an initializes a Weight for a top-level query. */
public Weight weight(Searcher searcher)
 throws IOException {
 Query query = searcher.rewrite(this);
 Weight weight = query.createWeight(searcher);
 float sum = weight.sumOfSquaredWeights();
 float norm = getSimilarity(searcher).queryNorm(sum);
 weight.normalize(norm);
 return weight;
}
origin: org.apache.lucene/com.springsource.org.apache.lucene

/** Expert: Constructs and initializes a Weight for a top-level query. */
public Weight weight(Searcher searcher)
 throws IOException {
 Query query = searcher.rewrite(this);
 Weight weight = query.createWeight(searcher);
 float sum = weight.sumOfSquaredWeights();
 float norm = getSimilarity(searcher).queryNorm(sum);
 weight.normalize(norm);
 return weight;
}
org.apache.lucene.searchSimilarityqueryNorm

Javadoc

Computes the normalization value for a query given the sum of the squared weights of each of the query terms. This value is then multipled into the weight of each query term.

This does not affect ranking, but rather just attempts to make scores from different queries comparable.

Popular methods of Similarity

  • getDefault
    Return the default Similarity implementation used by indexing and search code. This is initially an
  • idf
    Computes a score factor for a simple term.The default implementation is: return idf(searcher.docFre
  • tf
    Computes a score factor based on a term or phrase's frequency in a document. This value is multiplie
  • decodeNorm
    Decodes a normalization factor stored in an index.
  • encodeNorm
    Encodes a normalization factor for storage in an index.The encoding uses a three-bit mantissa, a fiv
  • sloppyFreq
    Computes the amount of a sloppy phrase match, based on an edit distance. This value is summed for ea
  • coord
    Computes a score factor based on the fraction of all query terms that a document contains. This valu
  • getNormDecoder
    Returns a table for decoding normalization bytes.
  • lengthNorm
    Computes the normalization value for a field given the total number of terms contained in a field. T
  • computeNorm
  • encodeNormValue
  • scorePayload
    Calculate a scoring factor based on the data in the payload. Overriding implementations are responsi
  • encodeNormValue,
  • scorePayload,
  • byteToFloat,
  • floatToByte,
  • setDefault

Popular in Java

  • Making http requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • ImageIO (javax.imageio)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)