jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilijas <ilijastojko...@yahoo.com>
Subject Re: count function in query?
Date Thu, 21 Nov 2013 10:43:12 GMT
I have same problem with matching similar articles by tags. I want to show
related articles based on tags.
I tried: 
SELECT * FROM [nt:unstructured] AS t WHERE (t.tags LIKE '%Tag1%' OR t.tags
LIKE '%Tag2%') ORDER BY length(tags) DESC

It would be nice if I can do next: 

SELECT * FROM [nt:unstructured] AS t WHERE (t.tags LIKE '%Tag1%' OR t.tags
LIKE '%Tag2%') ORDER BY (length(tags) - length(replace(tags, 'Tag1', '')) -
length(replace(tags, 'Tag2', '')) )DESC

but, I can't. If someone has some idea how to solve this, please share with
us.



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/count-function-in-query-tp2294092p4659945.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message