Vishaal Kant <Vishaal_Kant <at> hyperion.com> writes:

> 
> Where can I find examples of Jackrabbit Search API usage examples??
> 
> My requirement is to achieve search using wild characters. 
> 
> I wanted to search my repository on the basis of Wild characters. I have
> add files to my repository, I am trying to use XPATH query to find files
> in repository.
> 
> Following the code segment which I am using for search.
> 
> QueryManager qm = session.getWorkspace().getQueryManager();
> 
> Query q = qm.createQuery("//HFM_Icon_32.gif",Query.XPATH);
> 
> QueryResult result = q.execute();
> 
> NodeIterator ni = result.getNodes();
> 
> The above code fetches me the file from the repository, but if I want to
> do a wild character search for eg. HFM*.gif, what will be query OR what
> is the best way to do search using wild characters in jackrabbit.
> 
> Thanks,
> 
> ~ Vishaal

Hi,

I'm wondering the same thing, I found this class:

org.apache.jackrabbit.core.query.lucene.WildcardQuery
(http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/query/lucene/WildcardQuery.html)

but unclear as to how to use it to perform a wildcard query?

Regards,
Dave



Reply via email to