David, As far as I can tell the '?' character works as it should with WildcardQuery. See src/test/org/apache/lucene/search/TestWildcard.java. The tests there use SimpleAnalyzer and WildcardQuery directly (i.e. not QueryParser). All tests pass. Try comparing your code with the code in the above test class.
Otis --- [EMAIL PROTECTED] wrote: > I've searched the mail archive and I'm still a bit confused as to the > current status of "?" wildcard queries. My experience, using > lucene-1.2-RC5, is that "?" wildcard queries are unsupported using > the > StandardAnalyzer or SimpleAnalyzer. > > For example, the following search on two fields (go_id and go_desc) > (using StandardAnalyzer for indexing and searching): > > %java Search ./index "+go_id:5737 +go_desc:biosynthesis" > Result: > go_id:4853, 6783, 5737 > go_desc:uroporphyrinogen decarboxylase, heme biosynthesis, cytoplasm > Score: 1.0 > > using "*" wildcard: > %java Search ./index "+go_id:5737 +go_desc:biosynth*sis" > Result: > go_id:4853, 6783, 5737 > go_desc:uroporphyrinogen decarboxylase, heme biosynthesis, cytoplasm > Score: 1.0 > > using "?" wildcard: > %java Search ./index "+go_id:5737 +go_desc:biosynth?sis" > Noresults > > Is this the expected behavior for RC5, a reported bug, or an > unreported bug? > > thanks, > --David M. Goodstein __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
