lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Is it possible to force solr show all facet values for the field with an enum type?
Date Sat, 05 Jan 2019 17:41:47 GMT
So really the results you want are q=*:*&facet.field=enumField right?
You could fire that query in parallel and combine the two in your app,
perhaps caching the result if the index isn't changing very rapidly.

Facets were designed with the idea that they'd only count for docs
that were hits, so there's no built-in way to do what you want. Which, BTW,
could be _very_ expensive in the general case. The query would
have to count up, say, the hits for 100M documents...


On Sat, Jan 5, 2019 at 1:53 AM Arvydas Silanskas
<> wrote:
> Hello,
> I have an enum solr fieldtype. When I do a facet search, I want that all
> the enum values appear in the facet -- and setting field.mincount = 0 is
> not enough. It only works, if there exist a document with the matching
> value for the field, but it was filtered out by current query (and then I'm
> returned that facet value with the count 0). But can I make it to also
> return the values that literally none of the documents in the index have?
> The values, that only appear in the enum declaration xml.

View raw message