Don't know Lucene internals, but I'd say you'd have to create your own 'reverse' B-Tree of some kind (Lucene gurus will probably advise you on the place where this can be changed in the Lucene). Even if this functionality can't be redefined in Lucene itself, you can easily implement it by yourself as a step before doing the search:
- get the terms from the dictionary - create the TreeMap with the 'reversed' spelling of the Terms (eg, instead of 'lucene' put 'enecul', etc) - after that you can easily search your TreeMap for '*ext' entries: - get the subMap from 'txe' to 'txf' (ie, you also need to reverse the spelling of the entry you search for) Vlad -----Original Message----- From: Fillion, Larry [mailto:[EMAIL PROTECTED] Sent: Friday, October 20, 2006 1:58 PM To: java-user@lucene.apache.org Subject: Wildcard Search and "Note: You cannot use a * or ? symbol as the first character of a search" Documentation: http://lucene.apache.org/java/docs/queryparsersyntax.html WildCard Searches Lucene supports single and multiple character wildcard searches. To perform a single character wildcard search use the "?" symbol. To perform a multiple character wildcard search use the "*" symbol. ... Note: You cannot use a * or ? symbol as the first character of a search. I have a business requirement to search for terms with a wildcard at the beginning "*ext". Is there a reason why this is not supported? Can I easily modify the code to allow this feature or is it a major change? Is there a some other way to do this? I could perform 26 queries a*ext b*ext c*ext d*ext ... and rolling them up but I am guessing there should be a better way. Thank you, Larry --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]