Semantic-Org / UI-Search

A search element allows a user to query for results from a selection of data
http://semantic-ui.com/modules/search.html
9 stars 13 forks source link

programmatically modify search query #5

Open weiss-uni-lib-trier opened 5 years ago

weiss-uni-lib-trier commented 5 years ago

Dear developers,

let me introduce our project first: We are building a web search engine for a printed lexicon which has been digitalized.

For the search input we are providing search suggestions via the Semantic-UI search module.

We would like to provide functionality described by the following use case:

  1. When the user clicks on a suggestion, the suggestion shall be surrounded with "-Signs.
  2. The resulting quoted suggestion shall be placed into the corresponding input field.
  3. If the user enters another string before or after the string, which is quoted, the suggestion list shall only show suggestions for the unquoted part of the input.
  4. If the user clicks on another suggestion from the second suggestion list, the new suggestion shall be surrounded by ".
  5. The second quoted suggestion, which was selected by the user, shall replace all unquoted parts.

For our use case it is necessary, that the search query can be modified and afterwards be processed as if that modified query would have been the original query. Is this behaviour realisable yet?

YoungElPaso commented 5 years ago

I think you want to leverage Behaviours as found here:

https://semantic-ui.com/modules/search.html#/usage

See specifically, 'get query' and 'query' and 'search local' those might be useful.