I've been using torque since January of this year and
have been quite impressed.  But I've finally run into
a problem I can't figure out how to solve using
Torque.  

I am trying to do fulltext searches in mysql. The sql
for the search is:
SELECT * FROM Product WHERE
MATCH (name, description) AGAINST ('clock')
ORDER BY MATCH (name, description) AGAINST ('clock');

I'm trying to do that with a Criteria with mixed
success:
String matchString = "MATCH (name, description)
AGAINST ('clock')";
Criteria criteria = new Criteria();
criteria.add(ProductPeer.DESCRIPTION,
    (Object)matchString, Criteria.CUSTOM);
criteria.setLimit(MAX_RESULTS);
criteria.addDescendingOrderByColumn(matchString);
Collection products = ProductPeer.doSelect(criteria);
        
It works great as long as I remove the call to
addDescendingOrderByColumn().  When that call is
present I get an IndexOutOfBoundsException.

I'm using a pre-beta version of torque built off the
tip on 1/23/02.  I've been waiting for the release to
upgrade since the version I'm using has been quite
stable.  
Has anyone found a way to solve this sort of problem? 

Sean

__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to