Auto saved by Logseq

This commit is contained in:
Matthias Eckert 2023-01-25 12:03:31 +01:00
parent 8ea96eeea8
commit c954551416

View File

@ -1,5 +1,5 @@
- JQ Solr Facets Group #JQ #Solr
- Group the facet with .key: .value
- ``.facet_counts.facet_fields | {"sources": [.sourceUrl as $m | range(0; $m | length; 2) | {($m[.]): $m[(. + 1)]} ]}``
-
- ``.facet_counts.facet_fields | {"sources": [.sourceUrl as $m | range(0; $m | length; 2) | {($m[.]): $m[(. + 1)]} ]} | [.sources[] | to_entries | add] | sort_by(.value) | reverse | from_entries``
- Group the facet with .key: .value and sort it by value asc
- ``.facet_counts.facet_fields | {"sources": [.sourceUrl as $m | range(0; $m | length; 2) | {($m[.]): $m[(. + 1)]} ]} | [.sources[] | to_entries | add] | sort_by(.value) | reverse | from_entries``