Improved search query prep. Showing query in header after refresh.
This commit is contained in:
parent
44394ae85d
commit
a8e14f6305
|
@ -84,11 +84,6 @@ export default {
|
|||
components: {
|
||||
Search,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
query: this.$route.query ? this.$route.query.q : null,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ async function search() {
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
query: null,
|
||||
query: this.$route.query ? this.$route.query.q : null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -496,8 +496,8 @@ exports.up = knex => Promise.resolve()
|
|||
|
||||
CREATE FUNCTION search_releases(query text) RETURNS SETOF releases_search AS $$
|
||||
SELECT * FROM releases_search AS search
|
||||
WHERE search.document @@ plainto_tsquery('traxxx', regexp_replace(query, '\\.|-', ' ', 'g'))
|
||||
ORDER BY ts_rank(search.document, plainto_tsquery('traxxx', regexp_replace(query, '\\.|-', ' ', 'g'))) DESC;
|
||||
WHERE search.document @@ plainto_tsquery('traxxx', regexp_replace(query, '\\.|-|(XXX\\.[\\d+|hd|sd].*$)', ' ', 'ig'))
|
||||
ORDER BY ts_rank(search.document, plainto_tsquery('traxxx', regexp_replace(query, '\\.|-|(XXX\\.[\\d+|hd|sd].*$)', ' ', 'ig'))) DESC;
|
||||
$$ LANGUAGE SQL STABLE;
|
||||
|
||||
CREATE FUNCTION search_sites(search text) RETURNS SETOF sites AS $$
|
||||
|
|
|
@ -141,6 +141,7 @@ ktr
|
|||
mkv
|
||||
mov
|
||||
mp4
|
||||
rarbg
|
||||
rartv
|
||||
robots
|
||||
scenes
|
||||
|
|
Loading…
Reference in New Issue