jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: full text search
Date Mon, 05 Nov 2007 11:01:42 GMT
Hello Mike,

See
http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/Workspace.htm
l#getQueryManager()

and see in
http://jcp.org/aboutJava/communityprocess/final/jsr170/index.html
specification how to search with xpath or sql. 

I crosspost to user-list as well, because this is the appropriate list
for these kind of questions. pls continue thread on that list.

Regards Ard

> 
> hi all,
> 
> i want to do the search in the repository with full text. pls 
> let me know how can i do it. i m using jackrabbit.1.3.3.
> 
> here is my code:
> 
> 	Repository r = new TransientRepository();
> 				SimpleCredentials cred = new 
> SimpleCredentials("userid", ""
> 						.toCharArray());
> 				Session session = r.login(cred, null);
> 				try {
> 					Workspace ws = 
> session.getWorkspace();
> 					Node rn = session.getRootNode();
> 
> 					Node fileNode = 
> rn.addNode(resObj.getID());
> 					
> fileNode.addMixin("mix:versionable");
> 					
> fileNode.setProperty("jcr:file", new String(resObj
> 							.getName()));
> 					
> fileNode.setProperty("jcr:user", new String(resObj
> 							.getUser()));
> 					
> fileNode.setProperty("jcr:content",
> 							new 
> ByteArrayInputStream(resObj.getDocument()));
> 					Calendar lastModified = 
> Calendar.getInstance();
> 					
> fileNode.setProperty("jcr:lastModified", lastModified);
> 					session.save();
> 					fileNode.checkin();
> 				} catch (Exception e) {
> 					throw new CommandException(e);
> 				} finally {
> 					session.logout();
> 				}
> 
> 
> Thanks,
> MIke
> --
> View this message in context: 
> http://www.nabble.com/full-text-search-tf4750749.html#a13584526
> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
> 
> 

Mime
View raw message