[ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12363822 ]
John Haxby commented on LUCENE-489: ----------------------------------- I'm sure someone mentioned on one of the lists a while back, but there's a technique that we used for an LDAP server that's applicable here. It's a bit like injecting synonyms: you'd have, say, a SubwordFilter that given "brown" would emit "rown" and "own" at the same position. A "*own" query would then simply drop the leading wildcard and look for the word. We stopped at three letters in the LDAP server. An alternative is to use a ReverseAlternativeFilter (say) that emits "brown" and "nworb" at the same position, but that only deals with prefix or postfix wildcards, but not both. I'm not sure how you'd stop "own" matching "brown" though. If someone could come up with some example code I don't suppose I'd be the only one who would be interested! > Wildcard Queries with leading "*" > --------------------------------- > > Key: LUCENE-489 > URL: http://issues.apache.org/jira/browse/LUCENE-489 > Project: Lucene - Java > Type: Wish > Components: QueryParser > Reporter: Peter Schäfer > > It would be nice to have wildcard queries with a leading wildcard ("?" or > "*"). > I'm aware that this is a well-known issue, and I do understand the reasons > behind it, > but try explaining that to our end-users ... :-( -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
