forked from IQSS/dataverse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompare
executable file
·19 lines (19 loc) · 1.07 KB
/
compare
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
DIR=/tmp/searchusers
FINCHKEY=`cat $DIR/1 | jq .data.apiToken | tr -d \"`
SPRUCKEY=`cat $DIR/4 | jq .data.apiToken | tr -d \"`
echo "Search API:"
curl -s "http://localhost:8080/api/search?q=*&key=$FINCHKEY" | jq '.data.fq_actual'
echo "Database:"
scripts/search/dbperms $1 | grep '|'
echo "Solr per group docs (old):"
curl -s "http://localhost:8983/solr/collection1/select?rows=100&wt=json&indent=true&q=entityid%3A$1" | jq '.response.docs[] | {id, name_sort, perms_ss}'
echo "Solr permission docs (new):"
curl -s "http://localhost:8983/solr/collection1/select?rows=100&wt=json&indent=true&q=definition_point_dvobject_id_s%3A$1" | jq '.response.docs[] | {definition_point_s,discoverable_by_ss}'
echo "Java:"
curl -s "http://localhost:8080/api/search/perms?q=*&key=$FINCHKEY&id=$1" | jq '.data[]' 2>/dev/null
exit
echo "Search API perms, items (finch):"
curl -s "http://localhost:8080/api/search?q=*&key=$FINCHKEY" | jq '.data | {fq_actual, items}'
echo "Search API perms, items (spruce):"
curl -s "http://localhost:8080/api/search?q=*&key=$SPRUCKEY" | jq '.data | {fq_actual, items}'