Hello Stefan,
Have you tried to add processEmpty:true ?

json.facet={processEmpty:true,"source":{"type":"terms","field":"source","
domain":{"excludeTags":"source"}}}

On Wed, Sep 14, 2016 at 5:12 PM, Stefan Matheis <ste...@mathe.is> wrote:

> I’m not entirely sure i’m describing the correct problem here - for now it
> looks like the only way it occurs and i hope it’s not misleading any
> pointers that would be helpful. so in case you think i got it wrong, please
> say so
>
> I have two documents in the index [{"source":"foo"}, {"source":"bar”}]
> where source is a simple string field (indexed as well as stored, if
> that’ll matter).
>
> Using
>
> > ?q=*:*
> > &fq={!tag=source}source:"meh"
> > &json.facet={"source":{"type":"terms","field":"source","
> domain":{"excludeTags":"source"}}}
>
> where meh is a value that is not available for source, i get no results
> (expected) but no facets as well - which is rather unexpected to me. as
> soon as i go with source:”bar” (or something else that yields at least one
> record) i’m getting a record back and as well facets.
>
> which is why i’ve started of with the idea that there might be a
> correlation between those things. verifying the situation using the old
> facet approach i always get the expected facets back, no matter if the
> result is empty or not.
>
> Or isn’t it supposed to work like this anymore and i’m the guy who didn’t
> get the memo?
>
> Thanks
> Stefan
>
>


-- 
Sincerely yours
Mikhail Khludnev

Reply via email to