Hi Alex,
Thanks for the reply and information. It is very useful. Using
Jcr:contains I am able to search on the node content. But I need to search the
file content also. It's not working with Jcr:contains. Thanks again for the
needful.
Thanks,
Jenni
-----Original Message-----
From: Alexander Klimetschek [mailto:[email protected]]
Sent: Tuesday, May 11, 2010 4:20 PM
To: [email protected]
Subject: Re: Lucene search should create index of Jackrabbit repository
On Tue, May 11, 2010 at 11:52, Jenni Pothu <[email protected]> wrote:
> I am new to Jackrabbit and lucene search.. Actually I have a
> requirement like when I click on the search button it should do the
> lucene search like it should create index of Jackrabbit repository and
> do the search on the repository files. Lucene should be able to do
> search on the Jackrabbit repository files(Here Jackrabbit repository is
> something like datasource). I am not getting any information on this.
> Please help me if you have any idea or sample programme. Thanks in
> advance.
JCR has built-in search capabilities, including full-text search.
Jackrabbit already uses a Lucene index to implement this:
http://www.day.com/specs/jcr/1.0/ (section 6.6 for xpath, section 8.5 for sql)
http://www.day.com/specs/jcr/2.0/ (section 6 for aqm/jcr-sql2)
A simple xpath fulltext search query looks like this:
//*[jcr:contains(., 'my search terms')]
Here is some tutorial to get you started:
http://sujitpal.blogspot.com/2007/09/more-jackrabbit-using-xpath-queries.html
Regards,
Alex
--
Alexander Klimetschek
[email protected]
--------------------------------------------------------------------------------------------
This message, including any attachments, contains confidential information
intended for a specific individual and purpose, and is intended for the
addressee only. Any unauthorized disclosure, use, dissemination, copying, or
distribution of
this message or any of its attachments or the information contained in this
e-mail, or the taking of any action based on it, is strictly prohibited. If you
are not the intended recipient, please notify the sender immediately by return
e-mail and delete this message.
--------------------------------------------------------------------------------------------