+ if (!strcmp(rank_cluster, "yes"))
+ service->rank_cluster = 1;
+ else if (!strcmp(rank_cluster, "no"))
+ service->rank_cluster = 0;
+ else
+ {
+ yaz_log(YLOG_FATAL, "service: rank@cluster boolean");
+ return 0;
+ }
+ }
+ if (rank_debug)
+ {
+ if (!strcmp(rank_debug, "yes"))
+ service->rank_debug = 1;
+ else if (!strcmp(rank_debug, "no"))
+ service->rank_debug = 0;
+ else
+ {
+ yaz_log(YLOG_FATAL, "service: rank@debug boolean");
+ return 0;
+ }
+ }
+ if (rank_follow)
+ {
+ service->rank_follow = atof(rank_follow);
+ }
+ if (rank_lead)
+ {
+ service->rank_lead = atof(rank_lead);
+ }
+ if (rank_length)
+ {
+ if (!strcmp(rank_length, "linear"))
+ service->rank_length = 2;
+ else if (!strcmp(rank_length, "log"))
+ service->rank_length = 1;
+ else if (!strcmp(rank_length, "none"))
+ service->rank_length = 0;
+ else
+ {
+ yaz_log(YLOG_FATAL, "service: rank@length linear|log|none");
+ return 0;
+ }