On Mon, Sep 14, 2009 at 16:07, Gary Long <[email protected]> wrote: > I have a JCR with files converted into binary and i'm trying to perform > fulltext search. I'm using SQL. > My query is : > > "SELECT * FROM mnt:resource WHERE contains(* , '" + textQuery + " OR " + > textQuery + "% OR %" + textQuery + " OR %" + textQuery + "%')" > > When i try for the word lucene (for exemple) i get results. But if i try > with luc or lucen, there are no matches...
The (JCR-) SQL CONTAINS and the Xpath jcr:contains methods do not support wildcard characters, as they are working on a tokenized fulltext index. For using wildcard queries, there is LIKE/jcr:like which works directly on properties: SELECT * FROM mnt:resource WHERE (my:property LIKE lucene) OR (my:property LIKE luc%) OR (my:property LIKE %ene) Regards, Alex -- Alexander Klimetschek [email protected]
