SQL 2 Query for full text search. | Community
Skip to main content
sureshy2015
October 16, 2015
Solved

SQL 2 Query for full text search.

  • October 16, 2015
  • 4 replies
  • 6346 views

Need SQL2 Query for full text search .Do not want to use query builder.Please help me for the same.

Best answer by Peter_Puzanovs

Hey Suresh,

Have you looked at awesome post by:

http://labs.6dglobal.com/blog/2014-10-07/9-jcr-sql-2-queries-every-aem-dev-should-know/

They provide an example:

SELECT * FROM [nt:base] AS s WHERE CONTAINS(s.title, 'client')

(try to replace s.title with s.*)

SELECT * FROM [nt:base] AS s WHERE CONTAINS(s.*, 'client')

Thanks,

Peter

4 replies

Peter_Puzanovs
Community Advisor
Peter_PuzanovsCommunity AdvisorAccepted solution
Community Advisor
October 16, 2015

Hey Suresh,

Have you looked at awesome post by:

http://labs.6dglobal.com/blog/2014-10-07/9-jcr-sql-2-queries-every-aem-dev-should-know/

They provide an example:

SELECT * FROM [nt:base] AS s WHERE CONTAINS(s.title, 'client')

(try to replace s.title with s.*)

SELECT * FROM [nt:base] AS s WHERE CONTAINS(s.*, 'client')

Thanks,

Peter

Lokesh_Shivalingaiah
October 16, 2015

you can use 'CONTAINS' to do that full text search. refer [1] and it gives an idea about it

[1] https://docs.jboss.org/jbossdna/0.7/manuals/reference/html/jcr-query-and-search.html#jcr-sql2-full-text-search-constraints

kautuk_sahni
Community Manager
Community Manager
October 19, 2015

Hi 

Please have a look at this article, this is good read.

Link:- http://labs.6dglobal.com/blog/2014-10-07/9-jcr-sql-2-queries-every-aem-dev-should-know/ (9 JCR-SQL2 Queries Every AEM Developer Should Know)

I hope this would help you.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
dan_klco
February 22, 2018

FYI since labs.6dglobal.com is down, here is the same post on JCRSQL2 queries on my personal blog:

https://www.danklco.com/posts/2014/10/07/9-jcr-sql-2-queries-every-aem-dev-should-know/

March 3, 2025