jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefan81 <stefan.schla...@process-relations.com>
Subject Problem with fulltext search
Date Mon, 10 Sep 2007 09:32:52 GMT

Hi all,

although I have read many threads I cannot figure out why my fulltext search
does not work. Here is my repository.xml:

<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">


</SearchIndex>

When I startup JBoss I cannot really see that the extractors are loaded. But
if I add for example org.apache.jackrabbit.extractor.bla then I get an
exception during startup. So I think the extractors are loaded.

In my repository on the filesystem I have configured "workspace.xml" like
repository.xml containing the same text filters.

I have a file "hello.rtf" containing just the word "hello". I load the file
into the repository:

File file = new File("hello.rtf");

MimeTable mt = MimeTable.getDefaultTable();
String mimeType = mt.getContentTypeFor(file.getName()); // this is
application/rtf

Node fileNode = parentnode.addNode(file.getName(), "nt:file");
Node resNode = fileNode.addNode("jcr:content", "nt:resource");
resNode.setProperty("jcr:mimeType", mimeType);
resNode.setProperty("jcr:encoding", "");
resNode.setProperty("jcr:data", new FileInputStream(file));

Why doesn´t the following query provide any results?

Query q = qm.createQuery("//*[jcr:contains(.,'hello')] ", Query.XPATH);

Did I miss something? Has anybody help for me?
-- 
View this message in context: http://www.nabble.com/Problem-with-fulltext-search-tf4413382.html#a12589528
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message