You've already forked multi-select-facet
mirror of
https://github.com/stevenferrer/multi-select-facet.git
synced 2025-11-23 21:54:45 +02:00
improve search and auto-suggest
- include query term in search - improved autosuggest
This commit is contained in:
@@ -128,6 +128,15 @@ func (h *searchHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
q := r.URL.Query().Get("q")
|
||||
if len(q) == 0 {
|
||||
q = "*"
|
||||
} else {
|
||||
q = fmt.Sprintf("%q", q)
|
||||
}
|
||||
|
||||
productFilters = append(productFilters, fmt.Sprintf("{!tag=top}_text_:%s", q))
|
||||
|
||||
query := Map{
|
||||
"query": "{!parent tag=top filters=$skuFilters which=$product score=total v=$sku}",
|
||||
"queries": Map{
|
||||
|
||||
Reference in New Issue
Block a user