Split off from #1451110: Cache facet settings at the adapter level .

I'm developing a facet, and changes made in my module do not apply when I change the code, even after drush cc all or admin menu cache clear. Even large changes, like removing the facet entirely! The only way I can make the list update is by marking all content for re-indexing and re-indexing the site. Worse, if I have a change to a custom Facet that's already been "picked up" by the system (for example, I might change the query type), the only way to make Facet API pick up on that is to delete the Facet's db entry by hand.

* Drupal 7, apachesolr_search
* I have no caching systems enabled for the site, either internal or external

Comments

cpliakas’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Category: support » bug

Thanks for the post. Assuming a bug for now until we can narrow down what the underlying issue is.

cpliakas’s picture

Status: Active » Postponed (maintainer needs more info)

Postponing for now as I cannot replicate. Will need some help debugging this on why you are seeing this on you installation.

Thanks,
Chris

ohthehugemanatee’s picture

I've got a big solr faceting project coming up, so I'll keep my eye open for it and update this issue when I have something more replicable.

to be clear, the steps I used to replicate this on the one site were:

1) create a custom facet for something numeric like NID or TID, but use query type 'term' to begin with. On my site it's a TID associated with a related entity, but anything at all will do.
2) load the facet admin UI, and set the widget for the facet.
3) flush caches, rebuild search index, verify the facet is working.
4) change your custom facet to query type integer.
5) Go back to the facet admin UI and look for your changes.

cpliakas’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I've tried the steps you suggested, and cannot reproduce this behavior. The only think that I can think of is that the widget isn't valid for the selected query type, so the form is throwing an error and not saving the settings? Marking as cannot reproduce, but am willing to investigate further if I can get some additional confirmation on this bug.

Thanks for reporting,
Chris

merilainen’s picture

Status: Closed (cannot reproduce) » Needs work

I can confirm this is an issue. I'm trying to optimize site performance with caching and Varnish, but they cannot help much with search because facet blocks don't seem to work with caching and people can search with multiple different combinations of facet values.

But my problem is that when I update content the facets seems to show the old values even though the value in the result view has changed. I tried using a Search API rule to index the item immediately but it doesn't make any difference. Only thing which works is to rebuild the whole index.

Which probably means that this could be a Search API issue, if the index is not actually updated. The indexed values are used for filtering but I think Search API is loading values directly from the entity to the result view which is why the changed values displays correctly but facets are using the indexed values.

merilainen’s picture

Issue summary: View changes

syntax fix in referencing another issue