From: Kal A. <ka...@te...> - 2005-07-14 07:32:28
|
Hi Suseela, The format of the predicate is correct (i.e. a variable or object reference as the first parameter and a search string as the second parameter). The text searching for value-like is done using the TM4J Lucene integration so the search string should use Lucene's query syntax which is documented at http://jakarta.apache.org/lucene/docs/queryparsersyntax.html Also you should note that the tolog engine does not instantiate the full-text index automatically so you need to do that in your code before running any tolog queries which use value-like. See the example code in examples/fulltext/FullTextSearch.java. If you have a full stack trace for the error (or if you can change your code to produce one) that would be helpful in tracing the cause of this problem. Cheers, Kal suseela sarasamma wrote: > Hi > > I like to find objects in a topic map which matches > a pattern. For example all base names that contains > "refer". I am not sure I understood the usage. > > Tried the following for the simple query (leaving out ? etc) > value-like($A, "refer") > value-like($A, "\\.*refer.*\\") > value-like($A, "*refer*") > > All three gave the parsing error "Error instantiating predicate class". > Can some body please tell me the correct usage. > > thanks > suseela > > ------------------------------------------------------------------------ > Start your day with Yahoo! - make it your home page > <http://us.rd.yahoo.com/evt=34442/*http://www.yahoo.com/r/hs> |