documentcloud / visualsearch

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

Parameter value is sent as different parameter names when visualSearch.searchBox.value() is used #124

Closed polpan closed 10 years ago

polpan commented 11 years ago

I am using visualSearch.searchBox.value() in order to pass data to server.

I am using Java In servlets and data is passed to servlet in the following format

qryStr[0][Value]:EMPNAME qryStr[1][Search]:jack qryStr[2][filter]:or qryStr[3][Value]:EMPNO

Parameter name are like qryStr[0][Value], qryStr[1][Search], qryStr[2][filter] where Value, Search and filter are the autocomplete labels I am using in searchbox.

How can I get the values as one string array?

Thanks

samuelclay commented 10 years ago

If you go to the visualsearch.js homepage and open the console and type visualSearch.searchBox.value(), you should get a single string anyhow. You're probably using visualSearch.searchQuery.facets() which gives you the full facet models.