http://www.mosaicresources.com.au/titles?q=george+r+martin
String facets were hard, so I avoided them.
The price and misc facets are all Boolean attributes. I have helpers
that parse the facets object and display the refine link if the true
count for each facet is greater than 0 and less than the current
result count.
The format and subject facets are all on foreign key ints, but
otherwise work in a similar way.
A library to replace my embarrassingly ugly helpers would be awesome,
will_facet anyone?
James
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to
> thinking-sphi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/thinking-sphinx?hl=en.
>
unfortunately, the CRC is a one-way function – there is no way to directly convert it back to its original string.
You can see a solution I'm using in https://gist.github.com/881075 (using MySQL). A product has a brand name (e.g. Adidas) which is CRC'd so it can be faceted. Note that I've not validated the code (I did cut some unnecessary stuff) so you might need to adjust a thing or two. Also note that depending on the size of the queried table (products in this case) this might be slow as hell. You can, of course, let Postgres perform its wizardry which cached views, indexed expressions (you could index the resulting CRC values) etc.
Hope that helps,
- C.
- C.
- C.