Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Faceting with Lucene 
Block Join Query
Agenda 
1. Why we need special faceting for 
Block Join queries? 
2. Proposed Block Join facet component.
Introducing myself 
Oleg Savrasov, PhD 
A programmer 
Working for Grid Dynamics 
(griddynamics.com) 
Work and live in Sain...
Online shopping
Jerrica is looking for a dress
Huge amount of dresses
Facet filters help 
Facet 
filters 
Reduced 
amount
Tasks to be solved 
● Performant Search 
● Facet 
calculation/filtering 
FacetComponent ?
Product has many SKU
Aggregated facet counts 
Facets should 
count products, 
not SKU. 
Expected 
facets: 
COLOR 
Blue : 1 
Red : 1 
SIZE 
S : ...
Flat documents don’t help 
False positive match for 
+COLOR:Blue +SIZE:M
Separate SKU documents 
q = *:* 
facet.field = COLOR 
facet.field = SIZE 
COLOR 
Blue : 1 
Red : 2 
SIZE 
S : 2 
M : 1 
Wr...
Search products only 
q = *:* 
fq = scope:product 
facet.field = COLOR 
facet.field = SIZE 
COLOR : 0 
SIZE : 0 
No such 
...
Aggregated facet counts 
Facets should 
count products, 
not SKU. 
Expected 
facets: 
COLOR 
Blue : 1 
Red : 1 
SIZE 
S : ...
Solr Block Join Support (since Lucene 3.4.0) 
Green 
Blue 
Yellow 
Yellow 
Blue 
Green 
Product 
Green 
Yellow 
Product 
G...
SOLR-5743 Faceting with Block Join support 
● Create BlockJoinFacetComponent 
● ToParentQuery is expected 
● Facet counts ...
Faceting over DocSet slices 
Green 
Blue 
Yellow 
Yellow 
Blue 
Green 
Product 
Green 
Yellow 
Product 
Green 
Blue 
Yello...
Block Join Facet Component
BlockJoinFacetCollector
Facets counting
It works! 
q = 
{!parent which="scope:product"} 
COLOR:Blue 
child.facet.field = SIZE 
<response> 
... 
<lst name="facet_c...
The dress is found
Further improvements 
● Thorough profiling 
● Performance improvements 
● Algorithmic improvements
References 
http://www.slideshare.net/MarkHarwood/proposal-for-nested-document-support-in- 
lucene 
http://blog.mikemccand...
Big thanks! 
Please vote for SOLR-5743. 
Do you have any questions?
Faceting with Lucene Block Join Query: Presented by Oleg Savrasov, Grid Dynamics
Prochain SlideShare
Chargement dans…5
×
Prochain SlideShare
Approaching Join Index: Presented by Mikhail Khludnev, Grid Dynamics
Suivant
Télécharger pour lire hors ligne et voir en mode plein écran

0

Partager

Télécharger pour lire hors ligne

Faceting with Lucene Block Join Query: Presented by Oleg Savrasov, Grid Dynamics

Télécharger pour lire hors ligne

Presented at Lucene/Solr Revolution 2014

Livres associés

Gratuit avec un essai de 30 jours de Scribd

Tout voir
  • Soyez le premier à aimer ceci

Faceting with Lucene Block Join Query: Presented by Oleg Savrasov, Grid Dynamics

  1. 1. Faceting with Lucene Block Join Query
  2. 2. Agenda 1. Why we need special faceting for Block Join queries? 2. Proposed Block Join facet component.
  3. 3. Introducing myself Oleg Savrasov, PhD A programmer Working for Grid Dynamics (griddynamics.com) Work and live in Saint-Petersburg, Russia
  4. 4. Online shopping
  5. 5. Jerrica is looking for a dress
  6. 6. Huge amount of dresses
  7. 7. Facet filters help Facet filters Reduced amount
  8. 8. Tasks to be solved ● Performant Search ● Facet calculation/filtering FacetComponent ?
  9. 9. Product has many SKU
  10. 10. Aggregated facet counts Facets should count products, not SKU. Expected facets: COLOR Blue : 1 Red : 1 SIZE S : 1 M : 1
  11. 11. Flat documents don’t help False positive match for +COLOR:Blue +SIZE:M
  12. 12. Separate SKU documents q = *:* facet.field = COLOR facet.field = SIZE COLOR Blue : 1 Red : 2 SIZE S : 2 M : 1 Wrong numbers! There is only one product
  13. 13. Search products only q = *:* fq = scope:product facet.field = COLOR facet.field = SIZE COLOR : 0 SIZE : 0 No such fields in product documents
  14. 14. Aggregated facet counts Facets should count products, not SKU. Expected facets: COLOR Blue : 1 Red : 1 SIZE S : 1 M : 1
  15. 15. Solr Block Join Support (since Lucene 3.4.0) Green Blue Yellow Yellow Blue Green Product Green Yellow Product Green Blue Yellow Yellow Product docId Child docs Parent doc Query: {!parent which="scope:product"}COLOR:Blue 1 1 1 Block 1 1 1 scope:product COLOR:Blue ToParentQuery 1 1
  16. 16. SOLR-5743 Faceting with Block Join support ● Create BlockJoinFacetComponent ● ToParentQuery is expected ● Facet counts should correspond to amount of parent documents ● Only DocValues fields are supported
  17. 17. Faceting over DocSet slices Green Blue Yellow Yellow Blue Green Product Green Yellow Product Green Blue Yellow Yellow Product docId 0 1 0 0 1 0 1 DocSet Slice DocSet Slice counts COLOR Blue : 2 Aggregated counts COLOR Blue : +1
  18. 18. Block Join Facet Component
  19. 19. BlockJoinFacetCollector
  20. 20. Facets counting
  21. 21. It works! q = {!parent which="scope:product"} COLOR:Blue child.facet.field = SIZE <response> ... <lst name="facet_counts"> <lst name="facet_fields"> <lst name="SIZE"> <int name="S">14</int> <int name="L">22</int> <int name="XL">17</int> </lst> </lst> </lst> </response>
  22. 22. The dress is found
  23. 23. Further improvements ● Thorough profiling ● Performance improvements ● Algorithmic improvements
  24. 24. References http://www.slideshare.net/MarkHarwood/proposal-for-nested-document-support-in- lucene http://blog.mikemccandless.com/2012/01/searching-relational-content-with.html http://blog.griddynamics.com/2013/09/solr-block-join-support.html
  25. 25. Big thanks! Please vote for SOLR-5743. Do you have any questions?

Presented at Lucene/Solr Revolution 2014

Vues

Nombre de vues

2 886

Sur Slideshare

0

À partir des intégrations

0

Nombre d'intégrations

17

Actions

Téléchargements

21

Partages

0

Commentaires

0

Mentions J'aime

0

×