aboutsummaryrefslogtreecommitdiff
path: root/db/find.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/find.sql')
-rw-r--r--db/find.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/db/find.sql b/db/find.sql
index cdaebb3..dd6a011 100644
--- a/db/find.sql
+++ b/db/find.sql
@@ -49,7 +49,7 @@ with results(id, expression, reading, tags, depth, rules, original, deinflected)
(length(term) > 0)
limit 50 -- failsafe to catch any infinite loops
)
- select term, tags, depth, substr(:term, 1, deinflect.length), rules_out
+ select term, tags, depth, substr(:term, 1, deinflect.length), rules
from deinflect
)
select
@@ -65,7 +65,7 @@ with results(id, expression, reading, tags, depth, rules, original, deinflected)
inner join term on (term.expression = deinflections.term) or (term.reading = deinflections.term)
inner join term_tag on term_tag.term_id = term.id
inner join tag on term_tag.tag_id = tag.id
- group by term.id, deinflections.original
+ group by term.id, deinflections.original, deinflections.rules
having term.id is not null
)
select
@@ -92,5 +92,5 @@ left join sort_overlay
on (user_overlay.expression = results.expression) and
(user_overlay.reading = results.reading) and
(user_overlay.user_id = (select id from user where username = :user))
-group by results.id, results.original;
+group by results.id, results.original, results.rules;