1 Heikki's experiments with ranking
3 Personal notes, likely to be out of date.
5 Things to experiment with, and find out, and mess about
8 - Understand the ranking
9 - make a better ranking merging algorithm
14 Tue 19-Nov-2013 Started this branch
17 Wed 20-Nov-2013 Make a script that tests ranking against yaz-zserver
18 (as that is the default config). Mostly to have a script to build on later.
20 Thu 21-Nov-2013. Start my own complete config
22 Fri 22-Nov-2013. Adam defined a new sort type, relevance_h, and put it place
23 in the code. Now I have a place to implement my stuff. Relevant places:
24 pazpar2_config.c:1020 - minor
25 session.c:1318 - call relevance_prepare_read also for my type
26 reclists.c:104 - parse params
27 reclists.c:166 - compare function (for quicksort)
28 relevance.c:417 - calculate score
29 (same function as for relevance, but with extra arg for type)
31 The compare function compares positions, when sorting by Metadata_sortkey_position
32 This loops through the records (in the cluster) and finds the smallest rec->pos
33 and then compares those.
35 Next: See if I can implement a round robin.
36 - clients.h declares int clients_count(void)
37 - rec->client is a pointer to the client, but we don't have an ordinal from that
38 - keep an array of structs with the pointer, and locate the client number that way
39 - robin-score = pos * n_clients + client_num
41 relevance_new_rec is called every time a new record pops up. One or more to count_word,
42 exactly one to done_rec. That's where I can compare to the ranking of the previous
43 record. struct_relevance is one structure I have for myself, global (for the user
44 session), so I can keep my stuff in there, possibly an array of things for each target.
46 I should also add stuff directly to the client, and to the record, as I need.
48 Next: Plot the tf/idf scores against round-robin sorted order. Will be messy,
49 but later when we get a target that returns sorted records, it will make sense.
53 Setting up multiple SOLR targets in the same pazpar2
54 - Add #999 to the z-urls, so pazpar2 won't merge them. Different number for each
56 This URL shows the databases, with their numbers
57 http://lui.indexdata.com/solr/select?q=database:*&facet=true&facet.method=fc&facet.field=author_exact&facet.field=subject_exact&facet.field=date&facet.field=medium_exact&facet.field=database&rows=0&facet.mincount=1
59 Add this to the target defs
60 <set name="pz:extra_args" value="fq=database:4902">
62 After this, it should be possible to get records from different databases, some
63 with many records, some with a few. This is a good testing ground for merging
64 rankings! Test first with a round-robin, and plot the scores.