Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Static Rank Framework for Lucene/Solr Mike Schultz

Similar presentations


Presentation on theme: "A Static Rank Framework for Lucene/Solr Mike Schultz"— Presentation transcript:

1 A Static Rank Framework for Lucene/Solr Mike Schultz

2 Static Rank for Solr/Lucene Dynamic Rank Why Static Rank Combining Scores Static Rank Components

3 Multiple Fields / Multiple Types PubDate IsNews MediaType TextBody  Continuous (Date, Int, Float, …)

4 Multiple Fields / Multiple Types PubDate IsNews MediaType TextBody  Continuous (Date, Int, Float, …)  Boolean (True, False)

5 Multiple Fields / Multiple Types PubDate IsNews MediaType TextBody  Continuous (Date, Int, Float, …)  Boolean (True, False)  Enum (Book, CD, DVD, Cassette)

6 Multiple Fields / Multiple Types PubDate IsNews MediaType TextBody  Continuous (Date, Int, Float, …)  Boolean (True, False)  Enum (Book, CD, DVD, Cassette)  Text (Natural Language)

7 Dynamic Rank PubDate IsNews MediaType TextBody TF * IDF Query Dynamic Score

8 Dynamic Rank Query Dependent = F(Q,D) PubDate IsNews MediaType TextBody TF * IDF Query Dynamic Score

9 Dynamic Rank Query Dependent = F(Q,D) Huge dynamic range ( ) PubDate IsNews MediaType TextBody TF * IDF Query Dynamic Score

10 Dynamic Rank Query Dependent = F(Q,D) Huge dynamic range ( ) Not comparable across queries PubDate IsNews MediaType TextBody TF * IDF Query Dynamic Score

11 Dynamic Rank Query Dependent = F(Q,D) Huge dynamic range ( ) Not comparable across queries Not easily normalized PubDate IsNews MediaType TextBody TF * IDF Query Dynamic Score

12 Why Static Rank? PubDate IsNews MediaType TextBody Query Static Rank System Static Score

13 Why Static Rank? PubDate IsNews MediaType TextBody Query Static Rank System Static Score All (dynamic) things equal, I want – Newer over older

14 Why Static Rank? PubDate IsNews MediaType TextBody Query Static Rank System Static Score All (dynamic) things equal, I want – Newer over older – CD over cassette

15 Why Static Rank? PubDate IsNews MediaType TextBody Query Static Rank System Static Score All (dynamic) things equal, I want – Newer over older – CD over cassette – Arbitrary feature A over arbitrary feature B

16 Static Rank PubDate IsNews MediaType TextBody Query Static Rank System Query Independent = F(D) – i.e. static across queries Static Score

17 Static Rank PubDate IsNews MediaType TextBody Query Static Rank System Query Independent = F(D) – i.e. static across queries More easily bounded Static Score

18 Combined Rank PubDate IsNews MediaType TextBody TF * IDF Query Static Rank System Custom Query Combined Score

19 Framework - Requirements Custom Query Combined Score Intuitive, hand-tunable, debuggable

20 Framework - Requirements Custom Query Combined Score Intuitive, hand-tunable, debuggable Query-time only, no re-indexing

21 Framework - Requirements Custom Query Combined Score Intuitive, hand-tunable, debuggable Query-time only, no re-indexing Minimal parameters

22 Framework - Requirements Custom Query Combined Score Intuitive, hand-tunable, debuggable Query-time only, no re-indexing Minimal parameters Static Rank should boost / demote – But not too much! – Docs should stay in their own dynamic rank “neighborhood”.

23 Combining Scores - Approaches Custom Query Combined Score Addition? – Dynamic(0.0001) + Static(0.3) = – Dynamic(1542.1) + Static(0.3) = – Difficult to get right across queries

24 Combining Scores - Approaches Custom Query Combined Score Multiplication? – Dynamic(50.0) * Static(0.3) = 15.0 – Dynamic(10.0) * Static(2.0) = 20.0 – Could work, but awkward

25 Combining Scores - Approaches Linear Query Combined Score 1.Bound StaticScore: -1.0 to CScore = DScore*(100+S%*SScore) – At most, staticRank will boost/demote dynamicScore by S% – CScore = * (100+30*0.5) – CScore = * (100+30*-0.5)

26 LinearQuery

27 Static Rank PubDate IsNews MediaType TextBody Query Static Rank System Static Score

28 Static Rank PubDate IsNews MediaType TextBody Query Static Rank System Static Score Extend solr.ValueSource/Parser

29 Static Rank PubDate IsNews MediaType TextBody Query Static Rank System Static Score Extend solr.ValueSource/Parser Uses field cache for inputs

30 Static Rank PubDate IsNews MediaType TextBody Query Static Rank System Static Score Extend solr.ValueSource/Parser Uses field cache for inputs Extremely fast

31 Static Rank PubDate IsNews MediaType

32 Static Rank PubDate IsNews MediaType AgoValueSource years ago

33 Static Rank PubDate IsNews MediaType MuxValueSource 0 T F AgoValueSource years ago years ago

34 MuxValueSource Config

35 Static Rank PubDate IsNews MediaType 0 T F EnumValueSource MuxValueSource AgoValueSource years ago years ago

36 EnumValueSource Config Maps Fixed-Vocabulary to YEARS AGO A hierarchy and 3 values: MIN,0,MAX All things equal (dynamically), DVD = +3.3 years

37 Static Rank PubDate IsNews MediaType 0 T F SumValueSource EnumValueSource MuxValueSource AgoValueSource years ago years ago years ago years ago ? 1

38 Mapping YearsAgo to -1.0 – 1.0 Step Function: if > 10 years-ago = -1, else = +1 1 parameter Too abrupt

39 Mapping YearsAgo to -1.0 – 1.0 Step Function: if > 10 years-ago = -1, else = +1 1 parameter Too abrupt Linear No parameters (fixed) Too gradual over years

40 Mapping YearsAgo to -1.0 – 1.0 Step Function: if > 10 years-ago = -1, else = +1 1 parameter Too abrupt Linear No parameters (fixed) Too gradual over years Sigmoid 2 parameters Smooth over entire range Easy to calculate

41 Sigmoid Slope

42 Sigmoid Slope x-intercept (year)

43 1.0 Years-ago x0 = 1.5 years ago

44 Static Rank PubDate IsNews MediaType 0 T F SumValueSource EnumValueSource MuxValueSource AgoValueSource SigmoidValueSource 1 years ago years ago years ago

45 SigmoidValueSource Config

46 Static Rank Config

47 Conclusion solr.ValueSource/Parser - fast and flexible

48 Conclusion solr.ValueSource/Parser - fast and flexible CScore = DScore * (100 + S% * SScore) -1.0 < SScore < 1.0

49 Conclusion solr.ValueSource/Parser - fast and flexible CScore = DScore * (100 + S% * SScore) -1.0 < SScore < 1.0 “Time” as a common currency for static features


Download ppt "A Static Rank Framework for Lucene/Solr Mike Schultz"

Similar presentations


Ads by Google