openstax / webview

Connexions web site
http://cnx.org
GNU Affero General Public License v3.0
11 stars 8 forks source link

Display user query in search text box #188

Closed mmulich closed 10 years ago

mmulich commented 11 years ago

tldr; After a search is done, the query string should be displayed in the search text box.

(More details on the data being sent from cnx-archive...) The parsed query string can be found in the returned query object as query.limits. This resulting value from cnx-archive is a list of parsed terms. For example, if the user types "nuclear physics" author:'Bill Nye' type:book sort:pubDate then the query.limits value will be [{"text": "nuclear physics"}, {"author": "Bill Nye"}, {"type": "book"}]. Note that the sort:pubDate does not appear in this list. It can be found at query.sort as pubDate.

mmulich commented 11 years ago

@edwoodward Should the returned query be put in the "Find Content" search box or should a new search text box be added to the page?

edwoodward commented 11 years ago

I'm not sure this is needed since the terms are displayed as breadcrumbs. If we put a JSon-ish query string in the search field, how helpful is that to the user?

dak commented 11 years ago

The biggest benefits I can think of here would be fixing a typo in a limit or adding/modifying one of multiple limits.

philschatz commented 11 years ago

Would it be worth revisiting http://documentcloud.github.io/visualsearch/ (breadcrumbs you can see, edit and autocomplete!)

dak commented 10 years ago

Fixed in #591