jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike olo <mitesh9...@gmail.com>
Subject full text search
Date Mon, 05 Nov 2007 10:40:24 GMT

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