jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jenni Pothu" <Jen...@virtusa.com>
Subject Not returning any result when I am doing text search from added file from jackrabbit
Date Wed, 12 May 2010 11:23:49 GMT
Hi All,

                I am attaching the file to blogEntry node and blogEntry
node is added into repository. Now I want to search the content from the
added file.

 

     I have node like blogEntry and I am adding file to that node like
below

                                                //getting the
blogEntryNode form method getBlogEntryNode(blogTitle, session);

Node blogEntryNode = getBlogEntryNode(blogTitle, session);

Node NewblogEntry = blogEntryNode.addNode("NewblogEntry", "nt:file");

                  Node resNode = NewblogEntry.addNode("jcr:content",
"nt:resource");

                  resNode.setProperty("jcr:data", file);

                  

here file is of type Inputstream.

 

When I am searching with the  query like Query query =
queryManager.createQuery

                  ("//blogEntry/NewblogEntry(*, nt:file)[jcr:contains(.,
'"+sometext+"')]",Query.XPATH);

Here sometext is any content which I want to search in the file.

 

My query not returning any result. Is my query correct. Please correct
me if anything wrong in the code. Thanks in advance. 

 

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.

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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message