Closed (fixed)
Project:
Facets
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2016 at 15:13 UTC
Updated:
19 Dec 2016 at 21:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mpp commentedComment #3
mpp commentedin SearchApiString we need to change the 50 with a config value for each facet:
Comment #4
mpp commentedComment #5
dragos-dumi commentedComment #6
dragos-dumi commentedI've attached a patch for hard limit configuration.
We need a test for this.
Comment #7
dragos-dumi commentedComment #8
borisson_Comment #9
borisson_We discussed this at Drupalcon and figure that we can commit this after we have a test for this.
Comment #10
borisson_@Alienpruts had an actual issue with the limit of 50 over in #2815169: OR in facet always returns 50 results.
I'd say that makes this a very important issue.
I guess that also means we have to up the limit here. Let's add a couple of extra settings here; 250, 500. I don't think adding more is a good idea.
Comment #11
borisson_Adds an integration test and the additional config for more items.
Comment #12
borisson_Comment #13
borisson_This now has test-coverage, so removing the tag. Leaving this open for reviews.
Comment #14
Alienpruts commentedI can confirm the hard limit has been exposed and tested it with some values on a 300+ result set. No problems found :) .
Comment #15
heddnIf we set a limit of 3, why are we still showing 5 search results?
Comment #16
borisson_We set the limit only for the facets, not for the actual results.
Comment #17
heddnCan we add that as a comment to the test? It is a nit, so I'm going to move to RTBC and it can be fixed on commit or in a re-roll.
Comment #18
strykaizerI just tested this with search_api_db backend, and it did not limit the facet item count.
This might be a search_api_db issue though, maybe related to #2809753: getFacets in search_api_db returns wrong resultset (not sure)
Is this also tested with core_search as backend? Would be nice to have test coverage for both
Comment #19
borisson_I haven't tested it with core search yet no. I'll try to write a test that does that this weekend.
Comment #20
borisson_Stopping for the day. didn't get the core test to work yet :(
Comment #21
borisson_Comment #24
borisson_This currently doesn't work for core search, and I don't think it'll be easy to do so. Let's add a description or only show this option for search api based queries on top of #12?
Comment #25
borisson_Comment #27
borisson_Back to NR.
Comment #28
mpp commentedAtm I can't apply this patch as it's conflicting with "hierarchical structures" in #2807333 which I'm using..
I'll see if I can test is later but since this is where the magic happens, I'm quite confident it will work:
One thought though: I assume this won't scale for hard limit settings of 1000+?
Comment #29
borisson_Building a system with 500+ items per facet is a very big one, not sure if we can support that - as that'd probably be really really slow.
It's still possible doing a form-alter and adding more items in the dropdown in the UI.
Comment #30
borisson_Patch no longer applied.
Comment #32
borisson_Committed, thanks for the issues, patches and reviews.