Hi Chris,

I'm building a Drupal 7 site that has some advanced search requirements. I've been keeping an eye on the Search API/Facet API integration and I think that will be the way I'm going to go. Everything seems to have moved to FAcet API so I'll definitely be using that. As part of the build I'll have time to contribute to these projects to add the functionality but I'm not sure where to best focus my attention. I see bits and pieces have been started on most things but I'm not sure what the state of each is. Here is what the current site design requires:

1. Facets in the initial search form so the user can filter the initial search by more than just keywords (Is this what the fieldset realm does?)
2. Each facet block being an OR search with checkboxes. This seems to work in apachesolr - facet API setup.
3. Sliders for price ranges. I see a start of this as a sandbox project
4. A "Current search" block where I can group the terms selected by facet so it will say "Colours: red, blue. Sizes: Large" Rather than just saying "red, blue, large".

If you could let me know the state of development of each I'll know where to start developing.

I've posted here because I think most of these involve Facet API but feel free to send this post to Search API if you think that is more appropriate.

Thanks

Andrew

CommentFileSizeAuthor
#2 search_results.jpg405.43 KBa_lawry

Comments

cpliakas’s picture

Hi Andrew.

Thanks for posting, and I think that most of the points you mentioned above fall under Facet API's domain. I do have a couple of questions on what you posted.

1) The fieldset realm displays facets similar to the core Search module's "Advanced Search" implementation. Regarding starting off a search with facets, this has to be supported by the implementing module (i.e. Search API, Apache Solr). Check out #1252648: Allow for enabling facet blocks on non-search pages for information on how we are attacking this with Apache Solr. Is this the type of thing you are referring to?

2) The checkboxes widget should work across modules since the displays are backend agnostic, but it is up to the implementing module to decide whether or not it allows OR facets. See the allowed operators key in the hook_facetapi_facet_info() implementation.

3) Sliders need some love, and the sandbox project is a great place to work. However, I fear the functionality is dependent on #1161434: Modify "query type" key in facet definition to accept an array. I need to come up with a strategy for this, but it poses some interesting challenges that won't be easy to overcome. Specifically, it a facet can support multiple query types (i.e. term, range, etc) then what happens when you change to a widget that requires another query type? The concept of realms means that a single facet can be displayed in multiple ways, so there could be the possibility that one realm has a widget geared towards ranges, whereas another one is geared towards a straight term facet. The type of query has to be consistent since the Solr query is only executed once.

4) Feature requests are being captured in #593658: Make the current search block more configurable. I think that the "grouping" you mentioned is a cool idea, if you have a screenshot of how that might look it would be awesome if you posted there. Once I complete the general half-working architecture for this I will post the branch to facilitate contributions.

Hope this helps,
Chris

a_lawry’s picture

StatusFileSize
new405.43 KB

Hi Chris,

Thanks for the reply. I've attached a mockup of the design I was given to give you a better idea what I am trying to achieve. The mockup is actually a bit off because it shows facet blocks on the left that have already been searched for in the "You have searched for section" and it doesn't show the checkboxes in the facet blocks but that looks like it will work already.

I'll do another post in the issue about making the current search more configurable for number 4.

On the mockup you can see a "Quick Search" block which is essentially an advanced search type block. That block is to be displayed on most pages on the site and is used to initiate the search. That is what I was referring to in number 1. Is this kind of thing handled by Facet API?

It seems sliders might be a good place for me to start having a play. That seems like it is the most self contained feature and although it is blocked by that query type issue you mentioned I should be able to develop it and get it working for my site then plug it in once we come up with a generic solution for the different query types problem.

Andrew

cpliakas’s picture

Thanks for the screenshot! Definitely see where you are trying to go with this. Might be worth following the http://drupal.org/sandbox/thegreat/1230568, as in the future this could provide a method for grouping facets into multiple blocks, i.e. the Quick Search and Browse by Holiday groupings.

zambrey’s picture

Subscribing. Just a note that sliders for Facet API are also being done in Search API ranges module.

cpliakas’s picture

Thanks for pointing to that project, zambrey. I think there are spome things we can borrow, but overall the Facet API module should be able to reduce the code by about 1k lined due to the API functions and base classes it provides. Hopefully, anyways.

a_lawry’s picture

I've been following that one. Looks like it will be moving to Facet API because Search API will be dropping its old facet system

#1213360: Move to Facet API

cpliakas’s picture

Status: Active » Fixed

Marking as "fixed" since the support request was answered. Further work is being done and tracked in other issues surrounding the items that aren't currently able to be done in the module.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.