You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by far4ever <fa...@gmail.com> on 2009/04/18 16:02:28 UTC

enabling keyword search in the repository

hi

i am having an application where the data is stored in the jackrabbit
repository.
i need to enable the system to do keyword searching. but if i use the XPATH
i will be able to search with in the node in that certain path. I don't have
a clear idea on how to implement it.
will  i be able to do using XPATH or is there any other way of doing it.

can any one help.

thanks in advance.
-- 
View this message in context: http://www.nabble.com/enabling-keyword-search-in-the-repository-tp23113221p23113221.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: enabling keyword search in the repository

Posted by Alexander Klimetschek <ak...@day.com>.
On Sat, Apr 18, 2009 at 4:02 PM, far4ever <fa...@gmail.com> wrote:
> i need to enable the system to do keyword searching. but if i use the XPATH
> i will be able to search with in the node in that certain path. I don't have
> a clear idea on how to implement it.
> will  i be able to do using XPATH or is there any other way of doing it.

JCR allows full-text search in XPath using the jcr:contains function [1]:

//*[jcr:contains(., 'my-keyword')]

If you use SQL, this would look like this [2]:

SELECT * FROM * WHERE CONTAINS(., 'my-keyword')

[1] http://www.day.com/specs/jcr/1.0/6.6.5.2_jcr_contains_Function.html
[2] http://www.day.com/specs/jcr/1.0/8.5.4.5_CONTAINS.html


Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com