You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Markus Jelsma <ma...@openindex.io> on 2016/09/14 13:15:21 UTC

Facetting on a field doesn't work, until i optimized the index

Hello - we've just spotted the weirdest issue on Solr 6.1.

We have a Solr index full of logs, new items are added every few minutes. We also have an application that shows charts based on what's in the index, Banana style.

Yesterday we saw facets for a specific field were missing. Today we checked it out until we reduced the facet query just to facet=true&facet.field=FIELD, but it returned nothing of use, just an empty set of facets.

My colleague suggested the crazy idea to optimize the index, i protested because it is no use, numDoc always equals maxDoc and the optimize button was missing anyway. So i forced an optimize via the URL, and it worked, the facets for that field are now back!

Any ideas? Is there a related ticket?

Thanks,
Markus

Re: Facetting on a field doesn't work, until i optimized the index

Posted by Mikhail Khludnev <mk...@apache.org>.
Markus,

Could you spot more details about this particular field type? How does
'empty set of facets' look like? Is there results in that query?

On Wed, Sep 14, 2016 at 4:15 PM, Markus Jelsma <ma...@openindex.io>
wrote:

> Hello - we've just spotted the weirdest issue on Solr 6.1.
>
> We have a Solr index full of logs, new items are added every few minutes.
> We also have an application that shows charts based on what's in the index,
> Banana style.
>
> Yesterday we saw facets for a specific field were missing. Today we
> checked it out until we reduced the facet query just to
> facet=true&facet.field=FIELD, but it returned nothing of use, just an empty
> set of facets.
>
> My colleague suggested the crazy idea to optimize the index, i protested
> because it is no use, numDoc always equals maxDoc and the optimize button
> was missing anyway. So i forced an optimize via the URL, and it worked, the
> facets for that field are now back!
>
> Any ideas? Is there a related ticket?
>
> Thanks,
> Markus
>



-- 
Sincerely yours
Mikhail Khludnev

Re: Facetting on a field doesn't work, until i optimized the index

Posted by Erick Erickson <er...@gmail.com>.
That's strange....

Is there any chance that the schema changed? This is _really_ a shot
in the dark, but perhaps the optimize "normalized" the field
definitions stored with each segment.

Imagine segments 1-5 have one definition, and segments 6-10 have a
different definition for your field. Optimize would have to resolve
this somehow, perhaps that process made the magic happen?

NOTE: I'm not conversant with the internals of merge, so this may be
totally bogus......

Best,
Erick

On Wed, Sep 14, 2016 at 6:15 AM, Markus Jelsma
<ma...@openindex.io> wrote:
> Hello - we've just spotted the weirdest issue on Solr 6.1.
>
> We have a Solr index full of logs, new items are added every few minutes. We also have an application that shows charts based on what's in the index, Banana style.
>
> Yesterday we saw facets for a specific field were missing. Today we checked it out until we reduced the facet query just to facet=true&facet.field=FIELD, but it returned nothing of use, just an empty set of facets.
>
> My colleague suggested the crazy idea to optimize the index, i protested because it is no use, numDoc always equals maxDoc and the optimize button was missing anyway. So i forced an optimize via the URL, and it worked, the facets for that field are now back!
>
> Any ideas? Is there a related ticket?
>
> Thanks,
> Markus