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