Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

228
Vistas
How do I get the tf and idf score from a Solr query?

Following Solr documentations (https://cwiki.apache.org/confluence/display/solr/Function+Queries and others) I should just put idf(fieldname, 'term') as I do with termfreq(fieldname, 'term') in the field list. However, whenever I try this I get an exception as:

org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request

By looking at the logs I could find:

null:java.lang.UnsupportedOperationException: requires a TFIDFSimilarity (such as ClassicSimilarity)

And I have no idea what those are. Also when I use debugQuery=on it shows me, along with a lot of other things, the idf value for the document as:

4.406719 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5))

What should I do to fix these errors or to get desired tf and idf value for a term?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

You need to add following line in your "managed-schema" where similarity tag is commented at the end of the schema

<similarity class="solr.ClassicSimilarityFactory"/>
over 4 years ago · Santiago Trujillo Denunciar

0

I had run into the same issue and found this chrome extension -

https://chrome.google.com/webstore/detail/solr-query-debugger/gmpkeiamnmccifccnbfljffkcnacmmdl?hl=en

It is really helpful in breaking down "explain" and will display the value of idf for you.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda