jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Malligarjunan Sidduraj <Malligarjunan.Siddu...@webMethods.com>
Subject Problem with content search
Date Mon, 12 Mar 2007 04:42:59 GMT
My Query

String queryString = "/jcr:root//element(*, nt:resource)[(jcr:contains(., '"
                    + keyWord + "'))]";
Workspace workspace=session.getWorkspace();
QueryManager qm = workspace.getQueryManager();
Query query = qm.createQuery(queryString, Query.XPATH);
QueryResult queryResult = query.execute();


My Configuration 

<Workspace name="${wsp.name}">
        <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${wsp.home}"/>
        </FileSystem>
        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.obj.ObjectPersistenceManager">
        </PersistenceManager>
        <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
            <param name="textFilterClasses"
value="org.apache.jackrabbit.core.query.lucene.TextPlainTextFilter,org.apach
e.jackrabbit.core.query.MsExcelTextFilter,org.apache.jackrabbit.core.query.M
sPowerPointTextFilter,org.apache.jackrabbit.core.query.MsWordTextFilter,org.
apache.jackrabbit.core.query.PdfTextFilter,org.apache.jackrabbit.core.query.
HTMLTextFilter,org.apache.jackrabbit.core.query.XMLTextFilter,org.apache.jac
krabbit.core.query.RTFTextFilter,org.apache.jackrabbit.core.query.OpenOffice
TextFilter"/>
        </SearchIndex>
    </Workspace>

    <Versioning rootPath="${rep.home}/version">
        <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${rep.home}/version" />
        </FileSystem>

        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.obj.ObjectPersistenceManager">
</Versioning>

    <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
        <param name="path" value="${rep.home}/repository/index"/>
        <param name="textFilterClasses"
value="org.apache.jackrabbit.core.query.lucene.TextPlainTextFilter,org.apach
e.jackrabbit.core.query.MsExcelTextFilter,org.apache.jackrabbit.core.query.M
sPowerPointTextFilter,org.apache.jackrabbit.core.query.MsWordTextFilter,org.
apache.jackrabbit.core.query.PdfTextFilter,org.apache.jackrabbit.core.query.
HTMLTextFilter,org.apache.jackrabbit.core.query.XMLTextFilter,org.apache.jac
krabbit.core.query.RTFTextFilter,org.apache.jackrabbit.core.query.OpenOffice
TextFilter"/>
    </SearchIndex>


I have uploaded a document file.(hello.doc it contains a word "hello")

The above query returns the empty collection why?
Anything missing in the configuration?

Note: This query works fine for .txt, .java, .wsdl files.

Mime
View raw message