Hi,
I would like for the user to be able to select some terms (through checkboxes for instance), and then click search (without entering anything in the search box), so that he gets all the results corresponding to what he already filtered.
Would that possible in any way (without using Solr Views Integration) ?
Comments
Comment #1
fourmi4x commentedOr maybe a simpler variant :
Is it possible to display a page with Solr facets, but without any results at the beginning, and without a searchbox too? And then, when the user click on a facet it launches the search (without any text entered because there is no searchbox, so the search is run on all the content indexed, or even better on specific content types) ?
Any help building this solution will be truly appreciated !
Comment #2
qasimzee commentedI think I also badly need this. I highly appreciate the effort made by the developers of this module. I just don't understand that if we have no option of selecting multiple terms in a facet block (either CCK or Taxonomy) then why these are "checkboxes". In web development, when checkboxes are used, those specifically means that we want to allow users to select multiple options. But the checkboxes generated by this module are behaving like "radio buttons". I would like to present a classic difference between both these options. Please check http://dinosaurs.findthebest.com/
Comment #3
qasimzee commentedIf anyone has any patch about that, please please please share with me.
Thanks
Comment #4
marthinal commentedThe behavior of apachesolr module checkboxes i think is like this because when you click an option then you filter posibilities(options) in the others facets block and the number of results depend directly what did you select before .I dont know if mainteners would like to change it :) .
So maybe if you need to change it you need to develop a custom facet for your needs.
Comment #5
jpmckinney commented#2: I don't think the facets behave like radio buttons - when you select a new facet, it doesn't deselect the old facet. It does the union of the two facets and filters results by both.
#1: I think you can do this by going to admin/settings/apachesolr and setting "Behavior on empty search" to the behavior you want.
Comment #6
qasimzee commented@jpmckinney: For #2: When you select a facet, it entirely removes all other checkboxes and it seems to be the behaviour of radio buttons and you can't check two checkboxes at the the same time of a single facet block.
Comment #7
jpmckinney commentedThat's odd. That's not how the module used to work. Maybe someone buggered 6.x-2.x while I was gone.
Comment #8
jpmckinney commentedWhat's the URL look like before and after you click the link to add a second facet?
Comment #9
qasimzee commentedI have a CCK text field
ss_cck_field_rack_materialthat have two allowed values ("Stainless Steel" and "Nylon") when I select any filter from that cck field the URL becomes like"ss_cck_field_rack_material%3A"Stainless Steel"and "Nylon" checkbox disappears.I want to do a checkbox work like on http://dinosaurs.findthebest.com/ (mentioned above also and I hope you checked it)
Comment #10
jpmckinney commentedIs this configured on the block configuration page to be an AND facet or an OR facet? Are there nodes that are both "Stainless Steel" and "Nylon" or are nodes only one or the other?
Comment #11
qasimzee commentedYeah, on block page, it's configured as "OR".
Both "Nylon" and "Stainless Steel" type of nodes are available but there aren't any node that is both "Stainless Steel" and "Nylon". A node can be either "Stainless Steel" or "Nylon"
I just want that when block is configured as "OR" or and on facet when I check "Stainless steel", "Nylon" checkbox should keep appearing as "unchecked"(just like on the link I gave)
Comment #12
jpmckinney commentedI can't reproduce this behavior.
Comment #13
qasimzee commentedCan you share some screenshot? I have added mine. Please take a look. When I checked "Stainless Steel", "Nylon" totally disappeared.
Comment #14
efmo commentedI am experiencing the same issue, i.e. checkboxes acting like radio button...
Comment #15
jpmckinney commentedTry again with the latest dev code. #883106: move the OR facet code to the finalize hook. may have changed things.
Comment #16
qasimzee commentedSeems fine with the latest dev version 6.x-2.x but I don't understand why AND stopped working. Now if we set facet type as "AND" in block settings, the results are not filtered. Anyone else noted?
Comment #17
jpmckinney commentedCan you post screenshots as you did before?
Comment #18
qasimzee commentedWell, I actually reverted the code after a lot of struggle What happens is that filtration is not at all applied. The same results are returned whenever you click any checkbox if facet type "AND" is selected.
Comment #19
jpmckinney commentedComment #20
qasimzee commentedAny updates on how to fix it?
Comment #21
qasimzee commentedJust noticed that Taxonomy OR facet is also not working. Only CCK OR operator in working in latest dev release
Comment #22
jpmckinney commentedComment #23
jpmckinney commentedSee #920892: Taxonomy OR facets do not work correctly re: taxonomy OR facets
Comment #24
jpmckinney commentedIs the apachesolr_search module enabled? AND and OR filters will not work without it. If you are using subqueries (e.g. using apachesolr_access), there may be a bug with respect to subqueries. Otherwise, all such facets should work. According to screenshots in #13, that facet is behaving as if the operator is AND.
According to #16, CCK OR facets are working fine. I need more info (in particular, screenshots with URLs) to understand what you mean when you say AND is no longer working. Taxonomy OR facets do not work correctly for a different reason (as per #920892).
Comment #25
pwolanin commented