projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
93cf5a3
)
Set facets on SRW request. Only implemented for SOLR.
author
Dennis Schafroth
<dennis@indexdata.com>
Thu, 26 Aug 2010 10:07:57 +0000
(12:07 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Thu, 26 Aug 2010 10:07:57 +0000
(12:07 +0200)
client/client.c
patch
|
blob
|
history
diff --git
a/client/client.c
b/client/client.c
index
6bb6b5e
..
e77e35c
100644
(file)
--- a/
client/client.c
+++ b/
client/client.c
@@
-1455,7
+1455,7
@@
static int send_SRW_searchRequest(const char *arg)
return 0;
}
sr->u.request->maximumRecords = odr_intdup(out, 0);
return 0;
}
sr->u.request->maximumRecords = odr_intdup(out, 0);
-
+ sr->u.request->facetList = facet_list;
if (record_schema)
sr->u.request->recordSchema = record_schema;
if (recordsyntax_size == 1 && !yaz_matchstr(recordsyntax_list[0], "xml"))
if (record_schema)
sr->u.request->recordSchema = record_schema;
if (recordsyntax_size == 1 && !yaz_matchstr(recordsyntax_list[0], "xml"))
@@
-2895,25
+2895,23
@@
static int cmd_facets(const char *arg)
return 0;
}
size = strlen(arg);
return 0;
}
size = strlen(arg);
- if (only_z3950())
- {
- printf("Currently only supported for Z39.50.\n");
- return 0;
+/*
+ MOVE to non-usage of it?
+ if (only_z3950() && !yaz_matchstr(sru_method, "solr")) {
+ // We are not Z39.50 and not SOLR (I think)
+ printf("WARN: Currently supported for Z39.50 and SOLR.\n");
}
}
- else
- {
- /* TODO Wrong odr. Loosing memory */
- ODR odr = odr_createmem(ODR_ENCODE);
- facet_list = yaz_pqf_parse_facet_list(odr, arg);
+ยบ/
+ /* TODO Wrong odr. Loosing memory */
+ ODR odr = odr_createmem(ODR_ENCODE);
+ facet_list = yaz_pqf_parse_facet_list(odr, arg);
- if (!facet_list)
- {
- printf("Invalid facet list: %s", arg);
- return 0;
- }
- return 1;
+ if (!facet_list)
+ {
+ printf("Invalid facet list: %s", arg);
+ return 0;
}
}
- return 2;
+ return 1;
}
}