Hello lucene users, Thanks for the interest regarding wild card searches.
The WildcardQuery interprets * for 1 or more characters. But i had to edit it for zero or more characters such that *place* , gives results containing 'marketplace' and 'placed', but also for 'place', as was the project requirement. Its only that instead of building the WildcardQuery explicitly, I wanted it to be done by QueryParser class for code optimization. I had posted the query for the same purpose. Any suggestions will be quite helpful. Thanks in advance, Best regards, Sampreet > Sorry, It looks like I was wrong. I should have said that I haven't > used WildcardQuery, but normally (i.e. not in Lucene), a few > characters, often 3, are required before the wild card character. > Sorry, can't help you, maybe somebody else can. > > Otis > > --- "Serge A. Redchuk" <[EMAIL PROTECTED]> wrote: >> Hello Otis, >> >> Strongly can not agree with you, because I really _can_ search for >> anything like '*new*'. >> >> _Simply_Beacuse_I_have_working_code_that_do_it_ >> >> Here's a slice of output of my program: >> >> Boolean wildcard search: >> built query: bee* >> news41:beem; >> news42:beem; >> news4:beem; >> >> Boolean wildcard search: >> built query: *ee >> f3:qthree; >> >> Boolean wildcard search: >> built query: +be* +path:*ws42 >> news42:beem; >> >> Boolean wildcard search: >> built query: +path:*ws4 +be* >> news4:beem; >> >> As you can see the first search returned 3 entries, but the 3-rd - >> only one. As well as the 4-th. >> And the 2-nd search returned only entry "f3:qthree;" >> (as we've expected: "built query: *ee"). >> >> And I've achieve it combining WildcardQueries in BooleanQuery, but did >> not achieve it by simple call of QueryParser.parser. >> >> Tuesday, December 11, 2001, 4:22:04 PM, you wrote: >> >> OG> If I understand you correctly, you tried to search for '*new*'. I >> OG> believe you can't use an asterisk (*) as the first query of the >> query >> OG> term. So, new* is valid, while *new or *new* is not. >> >> OG> Otis >> >> OG> --- "Serge A. Redchuk" <[EMAIL PROTECTED]> wrote: >> >> Hello sampreet, >> >> >> >> Tuesday, December 11, 2001, 6:44:29 AM, you wrote: >> >> >> >> sic> Hi All, >> >> >> >> sic> This must be simple enough, but can anyone please explain me >> >> when a >> >> sic> WildcardQuery is created in QueryParser i.e. what special >> >> characters in the >> >> sic> query string are required to build a WildcardQuery within >> >> QueryParser? >> >> >> >> Moreover, when I achieved complex search like this: "path:*new* >> >> comp*" >> >> by combining WildcardQueries in BooleanQuery (NOT BY QueryParser), >> >> and >> >> then got that query using boolq.toString(...); - the QueryParser >> >> COULD >> >> NOT parse this string !!! >> >> >> >> Is not it strange ? : >> >> >> >> QueryParser.parse( bquery.toString( ... ) ) .... - do not work >> >> :-( >> >> >> >> -- >> >> Best regards, >> >> Serge mailto:[EMAIL PROTECTED] >> >> >> >> >> >> -- >> >> To unsubscribe, e-mail: >> >> <mailto:[EMAIL PROTECTED]> >> >> For additional commands, e-mail: >> >> <mailto:[EMAIL PROTECTED]> >> >> >> >> >> OG> __________________________________________________ >> OG> Do You Yahoo!? >> OG> Check out Yahoo! Shopping and Yahoo! Auctions for all of >> OG> your unique holiday gifts! Buy at http://shopping.yahoo.com >> OG> or bid at http://auctions.yahoo.com >> >> >> >> -- >> Best regards, >> Serge mailto:[EMAIL PROTECTED] >> >> >> -- >> To unsubscribe, e-mail: >> <mailto:[EMAIL PROTECTED]> >> For additional commands, e-mail: >> <mailto:[EMAIL PROTECTED]> >> > > > __________________________________________________ > Do You Yahoo!? > Check out Yahoo! Shopping and Yahoo! Auctions for all of > your unique holiday gifts! Buy at http://shopping.yahoo.com > or bid at http://auctions.yahoo.com > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> For additional > commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
