You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Jenni Pothu <Je...@virtusa.com> on 2010/05/11 11:52:34 UTC

Lucene search should create index of Jackrabbit repository

Hi All,

      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. 

 

Click Button Search

       |

Lucene search should create index of Jackrabbit repository and then do
the search on repository files.

 

Thanks,

Jenni


--------------------------------------------------------------------------------------------

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.

--------------------------------------------------------------------------------------------

Re: Lucene search should create index of Jackrabbit repository

Posted by Alexander Klimetschek <ak...@day.com>.
On Wed, May 12, 2010 at 14:12, Jenni Pothu <Je...@virtusa.com> wrote:
> 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.

Binary properties of nt:file nodes are full-text extracted with the
help of Apache Tika (since 2.0 [1], before Jackrabbit also had its own
text extractors [2] [3]). The support of files depends on the file
format and whether there is an open source library available that can
handle that format. Some formats such as PDF come in so many varieties
that there are certain issues every now and then.

Also note that large text extractions are queued and the result of it
might not be immediately visible after the save.

[1] http://lucene.apache.org/tika/
[2] http://jackrabbit.apache.org/jackrabbit-text-extractors.html
[3] http://wiki.apache.org/jackrabbit/Search

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

RE: Lucene search should create index of Jackrabbit repository

Posted by Jenni Pothu <Je...@virtusa.com>.
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:aklimets@day.com] 
Sent: Tuesday, May 11, 2010 4:20 PM
To: users@jackrabbit.apache.org
Subject: Re: Lucene search should create index of Jackrabbit repository

On Tue, May 11, 2010 at 11:52, Jenni Pothu <Je...@virtusa.com> 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
alexander.klimetschek@day.com

--------------------------------------------------------------------------------------------

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.

--------------------------------------------------------------------------------------------

Re: Lucene search should create index of Jackrabbit repository

Posted by Alexander Klimetschek <ak...@day.com>.
On Tue, May 11, 2010 at 11:52, Jenni Pothu <Je...@virtusa.com> 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
alexander.klimetschek@day.com