question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show count of facet values if ?_facet_size=max

See original GitHub issue

I sometimes want to get a count of the values in a facet - if it’s a facet of US states for example I want to know if all 50 are represented.

Idea: if ?_facet_size=max is present, add a count to the facet heading. So on:

https://latest.datasette.io/fixtures/compound_three_primary_keys?_facet=content&_facet_size=max&_facet=pk1&_facet=pk2#facet-pk2

It could have something like this:

fixtures__compound_three_primary_keys__1_001_rows_and_NY_629_755_•_Untitled-1_—_datasette

Note that the first column shows >1000 - because in that case we’ve truncated the facet calculation since the maximum allowed returned rows is 1000.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
simonwcommented, Dec 15, 2021

You’ve caused me to rethink this feature - I no longer think there’s value in only showing these numbers if ?_facet_size=max as opposed to all of the time. New issue coming up.

0reactions
plpxskcommented, Dec 14, 2021

Great feature.

But what is the right way to enable this to show up? Currently, it seems I need to edit the URL to add, in the right place, &_facet_size=max

Is there another (easier) way to enable this feature?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clarifying confusion with facets, facet values, maxFacetHits ...
When searching for facet values, the parameter maxFacetHits determines the number of possible values that can be returned.
Read more >
Display all the facets, with 'minimum facet count' to 0, even if ...
Is it possible to show every facets in a block, even if theres no results ? I understand that the normal behavior is...
Read more >
Facets - Ex Libris Knowledge Center
Once the system determines which values to display for each category, it will count the matching records from the first 50,000 results per...
Read more >
Getting and Using Facet Information in Amazon CloudSearch
If you want to display top facets for genre, you would include facet.FIELD in the query, along with the number of facet values...
Read more >
Results count in facet is displaying wrongly in Endeca
If I select black now, all the facet value count will show as 11, that is adding 5 to it. No customization done...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found