can you please enable debug messages for the class org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor and re-run your test?

the log file will then contain debug messages about the text extraction process.

regards
 marcel

stefan81 wrote:
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?

Reply via email to