jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmed Elshereay <AElsher...@idc.com>
Subject Full Text Search jackrabbit 2.1.0
Date Mon, 12 Jul 2010 14:47:04 GMT
Hi everyone,
I use jackrabbit 2.1.0, and I'd like to do full text search in nodes that 
hold documents (word, pdf.. and so on)
I wrote the following code, and the porblem is that it never returns 
result! Although the documents are there and the query string which I 
enter does exist in those documents. Don't know what did I miss or did 
Could it be because I didn't specify values for the columns and orderings? 
Actually I don't know what are these!
When I use XPath (which is deprecated) it works fine.

Here is the JQOM code:
        QueryManager queryManager = 
        QueryObjectModelFactory qomf = queryManager.getQOMFactory();
        ValueFactory vf = session.getValueFactory();

        String selectorName = "fullTextSearchSelector";
        Selector selector = qomf.selector("nt:resource", selectorName);

        Constraint constraint = qomf.fullTextSearch(selectorName, 
"jcr:data", qomf.literal(vf

        QueryObjectModel queryObjectModel = qomf.createQuery(selector, 
constraint, null,

        QueryResult result = queryObjectModel.execute();
        RowIterator iter = result.getRows();
        System.out.println("size: " + iter.getSize());
        while (iter.hasNext()) {
            Row row = iter.nextRow();
            System.out.println("Row: " + row.toString());

Please, can any one tell me what could be wrong here? And if it's better 
ot use SQL, so how?
Thank you in advance.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message