documentcloud / visualsearch

A Rich Search Box for Real Data
http://documentcloud.github.com/visualsearch
MIT License
1.8k stars 237 forks source link

show facets onclick? #45

Closed danielebailo closed 12 years ago

danielebailo commented 12 years ago

This post can be found also here http://stackoverflow.com/questions/9432478/visualsearch-js-how-to-show-facets-onclick

A feature which, according to my users feedback, is realy missing, is the possiblity to know, somehow, which are the available facets. My facets are many and it would be really nice to have a list of facets (maybe grouped) when clicking on the searchbox.

I had a look on the annotated source code, in particular to search_parser.js and to search_box.js.

I suppose that I've to trigger the click event on the element with VS-search-inner id. Or maybe another way would be to work on the parse function... I'm a little bit confused.

I also noticed the showFacetCategoryMenu which, unused at the moment, might implement the feature I'm searching for if modifyed.

So, in conclusion, my question are:

can anybody put me in the right direction? which would be the right place to put my hands on, in order to implement the "show available facets" function?

samuelclay commented 12 years ago

I'll be adding this feature later this week. Stay tuned. (It's in a branch that I haven't pushed due to lack of time.)

danielebailo commented 12 years ago

ok great! many thanks.

ghost commented 12 years ago

Is there any update on this? I'm in need of this feature as well, and it doesn't appear that anything's changed with the most recent 0.2.2 release

samuelclay commented 12 years ago

Yup, in release 0.3.0.

ghost commented 12 years ago

Awesome, that's exactly what I needed