voceconnect / lift-search

Lift Search for WordPress
14 stars 12 forks source link

Faceted search for custom taxonomies/fields #56

Closed JairusKhan closed 10 years ago

JairusKhan commented 10 years ago

I'm trying to get Lift Search working with faceted searches for custom fields/taxonomies, but I can't figure out how to make it work properly. I've looked at the documentation and the readme, but I can't make it work.

I have a custom post type called "companies". I have a custom taxonomy called 'city'. I would like to have a faceted search, so that when searching the 'companies' post type, you can drill down by ‘toronto’ or ‘miami’ or what-have-you.

I’ve looked at how you handle it for categories and post_tags and tried to replicate that, but it doesn’t work. It sounds simple! But I’m stuck. What am I missing?

prettyboymp commented 10 years ago

I've had a couple of requests about this and am trying to get to writing an example plugin that illustrates how to add a taxonomy based facet. However, because of other priorities, I haven't been able to get to it yet. I really hope to have a good example available soon.

JairusKhan commented 10 years ago

Thanks for letting us know -- unfortunately I've had to switch products as this is a critical feature for my users. If you manage to get this up I'll give Lift another try!

lindhard commented 10 years ago

this will indeed be very useful to know or configure easily.... JairusKhan, which product did you switch to?

prettyboymp commented 10 years ago

We do have examples available here: https://github.com/voceconnect/lift-examples, but I haven't yet implemented a custom taxonomy example.

prettyboymp commented 10 years ago

Examples are added in https://github.com/voceconnect/lift-examples/commit/a6bf56020ba4071c4efa89b3971bdce208f1667b

JairusKhan commented 10 years ago

Hey. I've come back to look at Lift again and tried this example. It doesn't seem to add the custom taxonomy facet in search filters, nor can I find a way to include a second search field which searches that custom taxonomy.

I've looked again on the docs and through the various examples, but I can't get it working.

If, from a fresh install of Lift, I want to add a second search field (Search for X in posts with taxonomy Y), and have regular "Search for X" results faceted by taxonomy Y, what do I need to do?