SlideShare una empresa de Scribd logo
1 de 41
Descargar para leer sin conexión
Samuel Solís || @estoyausente
LAS TRIPAS DE
UN SISTEMA
SOLR
Samuel Solís || @estoyausente
¿Quién **** soy?
Samuel Solís || @estoyausente
Samuel Solís || @estoyausente
¿Qué es Solr?
Samuel Solís || @estoyausente
Solr y Drupal
Samuel Solís || @estoyausente
Samuel Solís || @estoyausente
Samuel Solís || @estoyausente
Mi problema: D6
Samuel Solís || @estoyausente
Samuel Solís || @estoyausente
Más allá del módulo
Samuel Solís || @estoyausente
Hacer una query
Samuel Solís || @estoyausente
http://searchengine.local:8983/solr/search/select/?wt=json&q=
vino&rows=30&defType=edismax&qf=ts_title+terms_ts_title+term
s_ts_description+tws_producer_name_fulltext+tws_product_type
+ss_variedad_principal+tws_do_fulltext+ss_sub_product_type+ss
_region+tws_country_fulltext+ts_maridaje_keywords&start=0&m
m=1&mm.autoRelax=true&ps=1&bf=if(gt(its_rating_count,4),fts_r
ating_average,0)&spellcheck=on&spellcheck.q=vino&fq=ss_langc
ode:es&fq=bs_on_sale:true&facet=on&facet.mincount=1&facet.fi
eld=ss_sub_product_type&facet.field=ss_variedad_principal&face
t.field=ss_country&facet.field=ss_do&facet.field=ss_producer_na
me&facet.field=ss_format_type
Samuel Solís || @estoyausente
Samuel Solís || @estoyausente
wt=json // Tipo de salida
q=vino // Término a buscar
rows=30 // Nº de filas a retornar
defType=edismax // Tipo de query parser
start=0 // paginador
mm=1 // Minimal match
Algunas reglas generales.
Samuel Solís || @estoyausente
Query fields
qf=ts_title^9+terms_ts_title+terms_ts_description+tws_pr
oducer_name_fulltext+tws_product_type+ss_variedad_princi
pal+tws_do_fulltext^5+ss_sub_product_type+ss_region+tws_
country_fulltext+ts_maridaje_keywords
Samuel Solís || @estoyausente
Boost
bf=if(gt(its_rating_count,4),fts_rating_average,0)
Samuel Solís || @estoyausente
Spellcheck
spellcheck=on
spellcheck.q=vino
Samuel Solís || @estoyausente
Filtros
fq=ss_langcode:es
fq=bs_on_sale:true
Samuel Solís || @estoyausente
Facets
facet=on
facet.mincount=1
facet.field=ss_sub_product_type
facet.field=ss_variedad_principal
Samuel Solís || @estoyausente
Depuración de errores
Samuel Solís || @estoyausente
Tres preguntas a resolver
¿Por qué algo sale?
¿Por qué sale donde sale?
¿Por qué no sale?
Samuel Solís || @estoyausente
1
¿Por qué algo sale?
¿Por qué sale donde sale?
Samuel Solís || @estoyausente
debug
debug=on
Samuel Solís || @estoyausente
"4yh6ae-search_index-entity:bb_product/1062611:es": "n12.092266 = sum of:n 8.292266 = max plus 0.01
times others of:n 5.5033407 = weight(terms_ts_title:barahonda in 2397) [SchemaSimilarity], result of:n
5.5033407 = score(doc=2397,freq=1.0 = termFreq=1.0n), product of:n 5.788076 = idf, computed as log(1
+ (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:n 153.0 = docFreqn 50099.0 = docCountn
0.9508066 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength))
from:n 1.0 = termFreq=1.0n 1.2 = parameter k1n 0.75 = parameter bn 3.5509093 =
avgFieldLengthn 4.0 = fieldLengthn 8.121311 = weight(terms_ts_description:barahonda in 2397)
[SchemaSimilarity], result of:n 8.121311 = score(doc=2397,freq=2.0 = termFreq=2.0n), product of:n
5.7482705 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:n 79.0 =
docFreqn 24934.0 = docCountn 1.4128269 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 -
b + b * fieldLength / avgFieldLength)) from:n 2.0 = termFreq=2.0n 1.2 = parameter k1n 0.75
= parameter bn 45.26947 = avgFieldLengthn 40.96 = fieldLengthn 5.419983 =
weight(tws_producer_name_fulltext:barahonda in 2397) [SchemaSimilarity], result of:n 5.419983 =
score(doc=2397,freq=1.0 = termFreq=1.0n), product of:n 5.419983 = idf, computed as log(1 + (docCount
- docFreq + 0.5) / (docFreq + 0.5)) from:n 216.0 = docFreqn 48901.0 = docCountn 1.0 =
tfNorm, computed as (freq * (k1 + 1)) / (freq + k1) from:n 1.0 = termFreq=1.0n 1.2 = parameter
k1n 0.0 = parameter b (norms omitted for field)n 6.1721554 = weight(ts_title:barahonda in 2397)
[SchemaSimilarity], result of:n 6.1721554 = score(doc=2397,freq=1.0 = termFreq=1.0n), product of:n
5.788255 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:n 153.0 =
docFreqn 50108.0 = docCountn 1.066324 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 -
b + b * fieldLength / avgFieldLength)) from:n 1.0 = termFreq=1.0n 1.2 = parameter k1n 0.75
= parameter bn 4.717211 = avgFieldLengthn 4.0 = fieldLengthn 3.8 =
FunctionQuery(if(gt(long(its_rating_count),const(4)),float(fts_rating_average),const(0))), product of:n 3.8 =
if(gt(long(its_rating_count)=19,const(4)),float(fts_rating_average)=3.8,const(0))n 1.0 = boostn 1.0 =
queryNormn",
Samuel Solís || @estoyausente
Samuel Solís || @estoyausente
60.223747 = sum of:
56.423748 = max plus 0.01 times others of:[matchs de
campos]
3.8 = [boots general]
Suma final
TIE param
Samuel Solís || @estoyausente
49.530067 = weight(terms_ts_title:barahonda in 2397)
[SchemaSimilarity], result of:
49.530067 = score(doc=2397,freq=1.0 = termFreq=1.0), product of:
9.0 = boost
5.788076 = idf
0.9508066 = tfNorm
Suma por campo
Inverse document frequency
= log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)
Normalized term frequency
(freq * (k1 + 1)) / (freq + k1 * (1 - b + b *
fieldLength / avgFieldLength))
Boost forzado
Samuel Solís || @estoyausente
Extra boost
3.8 = product of:
3.8 =
if(gt(long(its_rating_count)=19,const(4)),float(fts_rating
_average)=3.8,const(0))
1.0 = boost
Samuel Solís || @estoyausente
2
¿Por qué no sale?
Samuel Solís || @estoyausente
Samuel Solís || @estoyausente
Samuel Solís || @estoyausente
Ya casi hemos acabado
Samuel Solís || @estoyausente
schema.yml
Samuel Solís || @estoyausente
<dynamicField name="bm_*" type="boolean" indexed="true"
stored="true" multiValued="true"/>
<dynamicField name="bs_*" type="boolean" indexed="true"
stored="true" multiValued="false"/>
Campos dinámicos
Samuel Solís || @estoyausente
Campos dinámicos
<field name="name_autocomplete" type="text"
indexed="true" stored="true" multiValued="true" />
<copyField source="ss_do" dest="name_autocomplete" />
<copyField source="ss_brand" dest="name_autocomplete" />
Samuel Solís || @estoyausente
solrconfig.yml
Samuel Solís || @estoyausente
RequestHandlers
<requestHandler name="/suggest" class="solr.SearchHandler">
<lst name="defaults">
<str name="suggest">true</str>
<str name="suggest.dictionary">blendedSuggester</str>
<str name="suggest.count">15</str>
</lst>
<arr name="components">
<str>suggest</str>
</arr>
</requestHandler>
Samuel Solís || @estoyausente
Search
Component
<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">blendedSuggester</str>
<str name="lookupImpl">BlendedInfixLookupFactory</str>
<str name="indexPath">blended_suggestions</str>
<str name="field">name_autocomplete</str>
<str
name="dictionaryImpl">DocumentExpressionDictionaryFactory</str>
<str name="weightExpression">((its_top_ventas * 2) +
its_mejor_valorados)</str>
<str name="sortField">its_top_ventas</str>
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnStartup">false</str>
<str name="buildOnCommit">false</str>
</lst>
</searchComponent>
Samuel Solís || @estoyausente
Recap
Samuel Solís || @estoyausente
Samuel Solís || @estoyausente
La página de gracias de bodeboca

Más contenido relacionado

La actualidad más candente

Logic Design - Chapter 3: Boolean Algebra
Logic Design - Chapter 3: Boolean AlgebraLogic Design - Chapter 3: Boolean Algebra
Logic Design - Chapter 3: Boolean AlgebraGouda Mando
 
Parabola direction , vertex ,roots, minimum and maximum
Parabola direction , vertex ,roots, minimum and maximumParabola direction , vertex ,roots, minimum and maximum
Parabola direction , vertex ,roots, minimum and maximumNadeem Uddin
 
Lab lecture 2 bresenham
Lab lecture 2 bresenhamLab lecture 2 bresenham
Lab lecture 2 bresenhamsimpleok
 
Bresenham's line algo.
Bresenham's line algo.Bresenham's line algo.
Bresenham's line algo.Mohd Arif
 
Assignment on Numerical Method C Code
Assignment on Numerical Method C CodeAssignment on Numerical Method C Code
Assignment on Numerical Method C CodeSyed Ahmed Zaki
 
Ellipses drawing algo.
Ellipses drawing algo.Ellipses drawing algo.
Ellipses drawing algo.Mohd Arif
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversionMohd Arif
 
Signyourd digital signature certificate provider
Signyourd   digital signature certificate providerSignyourd   digital signature certificate provider
Signyourd digital signature certificate providerKishankant Yadav
 
Clase funcion cuadratica
Clase funcion cuadraticaClase funcion cuadratica
Clase funcion cuadraticasainpereztorres
 
Sketching derivatives
Sketching derivativesSketching derivatives
Sketching derivativesssuserdb91c91
 

La actualidad más candente (20)

Alg1 7.8 Point-Slope Form
Alg1 7.8 Point-Slope FormAlg1 7.8 Point-Slope Form
Alg1 7.8 Point-Slope Form
 
C++ TUTORIAL 3
C++ TUTORIAL 3C++ TUTORIAL 3
C++ TUTORIAL 3
 
Programming with OpenGL
Programming with OpenGLProgramming with OpenGL
Programming with OpenGL
 
Maths 301 key_sem_1_2007_2008
Maths 301 key_sem_1_2007_2008Maths 301 key_sem_1_2007_2008
Maths 301 key_sem_1_2007_2008
 
Quadratic functions
Quadratic functionsQuadratic functions
Quadratic functions
 
C++ TUTORIAL 8
C++ TUTORIAL 8C++ TUTORIAL 8
C++ TUTORIAL 8
 
Logic Design - Chapter 3: Boolean Algebra
Logic Design - Chapter 3: Boolean AlgebraLogic Design - Chapter 3: Boolean Algebra
Logic Design - Chapter 3: Boolean Algebra
 
Parabola direction , vertex ,roots, minimum and maximum
Parabola direction , vertex ,roots, minimum and maximumParabola direction , vertex ,roots, minimum and maximum
Parabola direction , vertex ,roots, minimum and maximum
 
Lab lecture 2 bresenham
Lab lecture 2 bresenhamLab lecture 2 bresenham
Lab lecture 2 bresenham
 
Bresenham's line algo.
Bresenham's line algo.Bresenham's line algo.
Bresenham's line algo.
 
Integration
IntegrationIntegration
Integration
 
C++ TUTORIAL 9
C++ TUTORIAL 9C++ TUTORIAL 9
C++ TUTORIAL 9
 
C++ TUTORIAL 10
C++ TUTORIAL 10C++ TUTORIAL 10
C++ TUTORIAL 10
 
Assignment on Numerical Method C Code
Assignment on Numerical Method C CodeAssignment on Numerical Method C Code
Assignment on Numerical Method C Code
 
Ellipses drawing algo.
Ellipses drawing algo.Ellipses drawing algo.
Ellipses drawing algo.
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversion
 
Signyourd digital signature certificate provider
Signyourd   digital signature certificate providerSignyourd   digital signature certificate provider
Signyourd digital signature certificate provider
 
Matlab file
Matlab file Matlab file
Matlab file
 
Clase funcion cuadratica
Clase funcion cuadraticaClase funcion cuadratica
Clase funcion cuadratica
 
Sketching derivatives
Sketching derivativesSketching derivatives
Sketching derivatives
 

Similar a Las tripas de un sistema solr

Machine Learning Model for M.S admissions
Machine Learning Model for M.S admissionsMachine Learning Model for M.S admissions
Machine Learning Model for M.S admissionsOmkar Rane
 
The Ring programming language version 1.6 book - Part 9 of 189
The Ring programming language version 1.6 book - Part 9 of 189The Ring programming language version 1.6 book - Part 9 of 189
The Ring programming language version 1.6 book - Part 9 of 189Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 10 of 196
The Ring programming language version 1.7 book - Part 10 of 196The Ring programming language version 1.7 book - Part 10 of 196
The Ring programming language version 1.7 book - Part 10 of 196Mahmoud Samir Fayed
 
Assignment 5.2.pdf
Assignment 5.2.pdfAssignment 5.2.pdf
Assignment 5.2.pdfdash41
 
Art and Science Come Together When Mastering Relevance Ranking - Tom Burgmans...
Art and Science Come Together When Mastering Relevance Ranking - Tom Burgmans...Art and Science Come Together When Mastering Relevance Ranking - Tom Burgmans...
Art and Science Come Together When Mastering Relevance Ranking - Tom Burgmans...Lucidworks
 
How to tune a query - ODTUG 2012
How to tune a query - ODTUG 2012How to tune a query - ODTUG 2012
How to tune a query - ODTUG 2012Connor McDonald
 
Ch02 primitive-data-definite-loops
Ch02 primitive-data-definite-loopsCh02 primitive-data-definite-loops
Ch02 primitive-data-definite-loopsJames Brotsos
 
The Ring programming language version 1.5.3 book - Part 88 of 184
The Ring programming language version 1.5.3 book - Part 88 of 184The Ring programming language version 1.5.3 book - Part 88 of 184
The Ring programming language version 1.5.3 book - Part 88 of 184Mahmoud Samir Fayed
 
6. Vectors – Data Frames
6. Vectors – Data Frames6. Vectors – Data Frames
6. Vectors – Data FramesFAO
 
11. Linear Models
11. Linear Models11. Linear Models
11. Linear ModelsFAO
 
Lecture#6 functions in c++
Lecture#6 functions in c++Lecture#6 functions in c++
Lecture#6 functions in c++NUST Stuff
 
Row patternmatching12ctech14
Row patternmatching12ctech14Row patternmatching12ctech14
Row patternmatching12ctech14stewashton
 
Comparison GUM versus GUM+1
Comparison GUM  versus GUM+1Comparison GUM  versus GUM+1
Comparison GUM versus GUM+1Maurice Maeck
 

Similar a Las tripas de un sistema solr (20)

Machine Learning Model for M.S admissions
Machine Learning Model for M.S admissionsMachine Learning Model for M.S admissions
Machine Learning Model for M.S admissions
 
Learn Matlab
Learn MatlabLearn Matlab
Learn Matlab
 
The Ring programming language version 1.6 book - Part 9 of 189
The Ring programming language version 1.6 book - Part 9 of 189The Ring programming language version 1.6 book - Part 9 of 189
The Ring programming language version 1.6 book - Part 9 of 189
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Ch3
Ch3Ch3
Ch3
 
The Ring programming language version 1.7 book - Part 10 of 196
The Ring programming language version 1.7 book - Part 10 of 196The Ring programming language version 1.7 book - Part 10 of 196
The Ring programming language version 1.7 book - Part 10 of 196
 
Assignment 5.2.pdf
Assignment 5.2.pdfAssignment 5.2.pdf
Assignment 5.2.pdf
 
Art and Science Come Together When Mastering Relevance Ranking - Tom Burgmans...
Art and Science Come Together When Mastering Relevance Ranking - Tom Burgmans...Art and Science Come Together When Mastering Relevance Ranking - Tom Burgmans...
Art and Science Come Together When Mastering Relevance Ranking - Tom Burgmans...
 
Vertica trace
Vertica traceVertica trace
Vertica trace
 
How to tune a query - ODTUG 2012
How to tune a query - ODTUG 2012How to tune a query - ODTUG 2012
How to tune a query - ODTUG 2012
 
Ch02 primitive-data-definite-loops
Ch02 primitive-data-definite-loopsCh02 primitive-data-definite-loops
Ch02 primitive-data-definite-loops
 
The Ring programming language version 1.5.3 book - Part 88 of 184
The Ring programming language version 1.5.3 book - Part 88 of 184The Ring programming language version 1.5.3 book - Part 88 of 184
The Ring programming language version 1.5.3 book - Part 88 of 184
 
6. Vectors – Data Frames
6. Vectors – Data Frames6. Vectors – Data Frames
6. Vectors – Data Frames
 
11. Linear Models
11. Linear Models11. Linear Models
11. Linear Models
 
Chapter 3 Arrays in Java
Chapter 3 Arrays in JavaChapter 3 Arrays in Java
Chapter 3 Arrays in Java
 
JavaScript Refactoring
JavaScript RefactoringJavaScript Refactoring
JavaScript Refactoring
 
R and data mining
R and data miningR and data mining
R and data mining
 
Lecture#6 functions in c++
Lecture#6 functions in c++Lecture#6 functions in c++
Lecture#6 functions in c++
 
Row patternmatching12ctech14
Row patternmatching12ctech14Row patternmatching12ctech14
Row patternmatching12ctech14
 
Comparison GUM versus GUM+1
Comparison GUM  versus GUM+1Comparison GUM  versus GUM+1
Comparison GUM versus GUM+1
 

Más de Samuel Solís Fuentes

Más de Samuel Solís Fuentes (16)

De managers y developers
De managers y developersDe managers y developers
De managers y developers
 
Hábitos y consejos para sobrevivir a un trabajo sedentario
Hábitos y consejos para sobrevivir a un trabajo sedentarioHábitos y consejos para sobrevivir a un trabajo sedentario
Hábitos y consejos para sobrevivir a un trabajo sedentario
 
Drupal intro for Symfony developers
Drupal intro for Symfony developersDrupal intro for Symfony developers
Drupal intro for Symfony developers
 
D8 Form api
D8 Form apiD8 Form api
D8 Form api
 
Mejorar tu código mejorando tu comunicación
Mejorar tu código mejorando tu comunicaciónMejorar tu código mejorando tu comunicación
Mejorar tu código mejorando tu comunicación
 
Custom entities in d8
Custom entities in d8Custom entities in d8
Custom entities in d8
 
Drupal8 simplepage v2
Drupal8 simplepage v2Drupal8 simplepage v2
Drupal8 simplepage v2
 
Drupal 8 simple page: Mi primer proyecto en Drupal 8.
Drupal 8 simple page: Mi primer proyecto en Drupal 8.Drupal 8 simple page: Mi primer proyecto en Drupal 8.
Drupal 8 simple page: Mi primer proyecto en Drupal 8.
 
Como arreglar este desastre
Como arreglar este desastreComo arreglar este desastre
Como arreglar este desastre
 
Drupal y rails. Nuestra experiencia
Drupal y rails. Nuestra experienciaDrupal y rails. Nuestra experiencia
Drupal y rails. Nuestra experiencia
 
Mejorar tu código hablando con el cliente
Mejorar tu código hablando con el clienteMejorar tu código hablando con el cliente
Mejorar tu código hablando con el cliente
 
Taller de introducción al desarrollo de módulos
Taller de introducción al desarrollo de módulosTaller de introducción al desarrollo de módulos
Taller de introducción al desarrollo de módulos
 
Más limpio que un jaspe.
Más limpio que un jaspe.Más limpio que un jaspe.
Más limpio que un jaspe.
 
Drupal as a framework
Drupal as a frameworkDrupal as a framework
Drupal as a framework
 
Arquitectura de información en drupal
Arquitectura de información en drupalArquitectura de información en drupal
Arquitectura de información en drupal
 
Drupal para desarrolladores
Drupal para desarrolladoresDrupal para desarrolladores
Drupal para desarrolladores
 

Último

MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 

Último (20)

MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 

Las tripas de un sistema solr

  • 1. Samuel Solís || @estoyausente LAS TRIPAS DE UN SISTEMA SOLR
  • 2. Samuel Solís || @estoyausente ¿Quién **** soy?
  • 3. Samuel Solís || @estoyausente
  • 4. Samuel Solís || @estoyausente ¿Qué es Solr?
  • 5. Samuel Solís || @estoyausente Solr y Drupal
  • 6. Samuel Solís || @estoyausente
  • 7. Samuel Solís || @estoyausente
  • 8. Samuel Solís || @estoyausente Mi problema: D6
  • 9. Samuel Solís || @estoyausente
  • 10. Samuel Solís || @estoyausente Más allá del módulo
  • 11. Samuel Solís || @estoyausente Hacer una query
  • 12. Samuel Solís || @estoyausente http://searchengine.local:8983/solr/search/select/?wt=json&q= vino&rows=30&defType=edismax&qf=ts_title+terms_ts_title+term s_ts_description+tws_producer_name_fulltext+tws_product_type +ss_variedad_principal+tws_do_fulltext+ss_sub_product_type+ss _region+tws_country_fulltext+ts_maridaje_keywords&start=0&m m=1&mm.autoRelax=true&ps=1&bf=if(gt(its_rating_count,4),fts_r ating_average,0)&spellcheck=on&spellcheck.q=vino&fq=ss_langc ode:es&fq=bs_on_sale:true&facet=on&facet.mincount=1&facet.fi eld=ss_sub_product_type&facet.field=ss_variedad_principal&face t.field=ss_country&facet.field=ss_do&facet.field=ss_producer_na me&facet.field=ss_format_type
  • 13. Samuel Solís || @estoyausente
  • 14. Samuel Solís || @estoyausente wt=json // Tipo de salida q=vino // Término a buscar rows=30 // Nº de filas a retornar defType=edismax // Tipo de query parser start=0 // paginador mm=1 // Minimal match Algunas reglas generales.
  • 15. Samuel Solís || @estoyausente Query fields qf=ts_title^9+terms_ts_title+terms_ts_description+tws_pr oducer_name_fulltext+tws_product_type+ss_variedad_princi pal+tws_do_fulltext^5+ss_sub_product_type+ss_region+tws_ country_fulltext+ts_maridaje_keywords
  • 16. Samuel Solís || @estoyausente Boost bf=if(gt(its_rating_count,4),fts_rating_average,0)
  • 17. Samuel Solís || @estoyausente Spellcheck spellcheck=on spellcheck.q=vino
  • 18. Samuel Solís || @estoyausente Filtros fq=ss_langcode:es fq=bs_on_sale:true
  • 19. Samuel Solís || @estoyausente Facets facet=on facet.mincount=1 facet.field=ss_sub_product_type facet.field=ss_variedad_principal
  • 20. Samuel Solís || @estoyausente Depuración de errores
  • 21. Samuel Solís || @estoyausente Tres preguntas a resolver ¿Por qué algo sale? ¿Por qué sale donde sale? ¿Por qué no sale?
  • 22. Samuel Solís || @estoyausente 1 ¿Por qué algo sale? ¿Por qué sale donde sale?
  • 23. Samuel Solís || @estoyausente debug debug=on
  • 24. Samuel Solís || @estoyausente "4yh6ae-search_index-entity:bb_product/1062611:es": "n12.092266 = sum of:n 8.292266 = max plus 0.01 times others of:n 5.5033407 = weight(terms_ts_title:barahonda in 2397) [SchemaSimilarity], result of:n 5.5033407 = score(doc=2397,freq=1.0 = termFreq=1.0n), product of:n 5.788076 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:n 153.0 = docFreqn 50099.0 = docCountn 0.9508066 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:n 1.0 = termFreq=1.0n 1.2 = parameter k1n 0.75 = parameter bn 3.5509093 = avgFieldLengthn 4.0 = fieldLengthn 8.121311 = weight(terms_ts_description:barahonda in 2397) [SchemaSimilarity], result of:n 8.121311 = score(doc=2397,freq=2.0 = termFreq=2.0n), product of:n 5.7482705 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:n 79.0 = docFreqn 24934.0 = docCountn 1.4128269 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:n 2.0 = termFreq=2.0n 1.2 = parameter k1n 0.75 = parameter bn 45.26947 = avgFieldLengthn 40.96 = fieldLengthn 5.419983 = weight(tws_producer_name_fulltext:barahonda in 2397) [SchemaSimilarity], result of:n 5.419983 = score(doc=2397,freq=1.0 = termFreq=1.0n), product of:n 5.419983 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:n 216.0 = docFreqn 48901.0 = docCountn 1.0 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1) from:n 1.0 = termFreq=1.0n 1.2 = parameter k1n 0.0 = parameter b (norms omitted for field)n 6.1721554 = weight(ts_title:barahonda in 2397) [SchemaSimilarity], result of:n 6.1721554 = score(doc=2397,freq=1.0 = termFreq=1.0n), product of:n 5.788255 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:n 153.0 = docFreqn 50108.0 = docCountn 1.066324 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:n 1.0 = termFreq=1.0n 1.2 = parameter k1n 0.75 = parameter bn 4.717211 = avgFieldLengthn 4.0 = fieldLengthn 3.8 = FunctionQuery(if(gt(long(its_rating_count),const(4)),float(fts_rating_average),const(0))), product of:n 3.8 = if(gt(long(its_rating_count)=19,const(4)),float(fts_rating_average)=3.8,const(0))n 1.0 = boostn 1.0 = queryNormn",
  • 25. Samuel Solís || @estoyausente
  • 26. Samuel Solís || @estoyausente 60.223747 = sum of: 56.423748 = max plus 0.01 times others of:[matchs de campos] 3.8 = [boots general] Suma final TIE param
  • 27. Samuel Solís || @estoyausente 49.530067 = weight(terms_ts_title:barahonda in 2397) [SchemaSimilarity], result of: 49.530067 = score(doc=2397,freq=1.0 = termFreq=1.0), product of: 9.0 = boost 5.788076 = idf 0.9508066 = tfNorm Suma por campo Inverse document frequency = log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5) Normalized term frequency (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) Boost forzado
  • 28. Samuel Solís || @estoyausente Extra boost 3.8 = product of: 3.8 = if(gt(long(its_rating_count)=19,const(4)),float(fts_rating _average)=3.8,const(0)) 1.0 = boost
  • 29. Samuel Solís || @estoyausente 2 ¿Por qué no sale?
  • 30. Samuel Solís || @estoyausente
  • 31. Samuel Solís || @estoyausente
  • 32. Samuel Solís || @estoyausente Ya casi hemos acabado
  • 33. Samuel Solís || @estoyausente schema.yml
  • 34. Samuel Solís || @estoyausente <dynamicField name="bm_*" type="boolean" indexed="true" stored="true" multiValued="true"/> <dynamicField name="bs_*" type="boolean" indexed="true" stored="true" multiValued="false"/> Campos dinámicos
  • 35. Samuel Solís || @estoyausente Campos dinámicos <field name="name_autocomplete" type="text" indexed="true" stored="true" multiValued="true" /> <copyField source="ss_do" dest="name_autocomplete" /> <copyField source="ss_brand" dest="name_autocomplete" />
  • 36. Samuel Solís || @estoyausente solrconfig.yml
  • 37. Samuel Solís || @estoyausente RequestHandlers <requestHandler name="/suggest" class="solr.SearchHandler"> <lst name="defaults"> <str name="suggest">true</str> <str name="suggest.dictionary">blendedSuggester</str> <str name="suggest.count">15</str> </lst> <arr name="components"> <str>suggest</str> </arr> </requestHandler>
  • 38. Samuel Solís || @estoyausente Search Component <searchComponent name="suggest" class="solr.SuggestComponent"> <lst name="suggester"> <str name="name">blendedSuggester</str> <str name="lookupImpl">BlendedInfixLookupFactory</str> <str name="indexPath">blended_suggestions</str> <str name="field">name_autocomplete</str> <str name="dictionaryImpl">DocumentExpressionDictionaryFactory</str> <str name="weightExpression">((its_top_ventas * 2) + its_mejor_valorados)</str> <str name="sortField">its_top_ventas</str> <str name="suggestAnalyzerFieldType">text</str> <str name="buildOnStartup">false</str> <str name="buildOnCommit">false</str> </lst> </searchComponent>
  • 39. Samuel Solís || @estoyausente Recap
  • 40. Samuel Solís || @estoyausente
  • 41. Samuel Solís || @estoyausente La página de gracias de bodeboca