Hello Jason,

On Wed, Aug 25, 2010 at 11:24 AM, jason wang <[email protected]> wrote:
>
> Hi,
>
>
>
> First of all, in order to use full-text search for files stored in 
> JackRabbit, do I need to set up indexing configuation manually? If so, how to 
> set it up?

You can, but out-of-the-box there is a proper working one.

> Currently I just run the following codes: nothing returns (no exceptin 
> either) even though a file contains the text. Is the sql wrong?
>
> QueryManager manager = session.getWorkspace().getQueryManager();
> String sql = "SELECT * FROM [nt:file] AS file WHERE CONTAINS(file,'text 
> should be found')";

Can you try:

CONTAINS(.,'text should be found')";

Regards Ard

> Query query = manager.createQuery(sql, Query.JCR_SQL2);
> QueryResult result = query.execute();
> NodeIterator itr = result.getNodes();
> hile (itr.hasNext()){
>      Node node = itr.nextNode();
>      System.out.println(node.getName());
>
> }
>
>
>
>
>
> Thanks a lot for your help.
>
> Jason
>
>
>

Reply via email to