includes local title data in search
This commit is contained in:
parent
7e3481f0f1
commit
8292987e0a
|
@ -38,10 +38,6 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
search: function() {
|
||||
if (this.search_text==="") {
|
||||
return
|
||||
}
|
||||
console.log(this.search_text)
|
||||
this.setSearchText(this.search_text)
|
||||
var local_search_result = this.searchLocalSiteData()
|
||||
var api_endpoint = '/api/collections/search?fulltext_search='
|
||||
|
|
|
@ -81,6 +81,10 @@ const store = new Vuex.Store({
|
|||
if (found != -1) {
|
||||
weight = weight +1
|
||||
}
|
||||
var found = state.sites[site].title.toLowerCase().search(state.search_text.toLowerCase())
|
||||
if (found != -1) {
|
||||
weight = weight +1
|
||||
}
|
||||
if (weight > 0) {
|
||||
var id = state.sites[site].id
|
||||
result[id] = weight
|
||||
|
|
Loading…
Reference in New Issue