Implementation of an input element with type-ahead suggestions (autocompletion) currently requires some javascript coding and having a autocompletion service.

We can borrow the code from reposearch and make it generic and include it in built-in.app, such that we can do something like:

page search(){
   var q:= "";
   ...
   inputAutocomplete(q, ArticleSearcher(), "title_ac")

   /*  - OR passing a namespace (when used) - */

   inputAutocomplete(q, ArticleSearcher(), "title_ac", "English")


}

...

search mapping Article{
    title
    title as title_ac using none (autocomplete)
    namespace by language
}

Thus we only need to provide the reference of the variable for input, the targeted searcher and the search field(s) to use for suggestions.

Submitted by Elmer van Chastelet on 19 March 2013 at 13:48

On 19 March 2013 at 13:48 Elmer van Chastelet tagged search

Log in to post comments