Hi, if you want to search by substring (i.e. "lp" should return "lpg" as a result) you should look at wildcards. So a search for "lp*" (* is the wildcard character) would return lpg, lpghxyz, lp12345 and so on...
On Thu, Jan 28, 2010 at 1:41 PM, andy green <dreamforl...@hotmail.fr> wrote: > > hello, > > I programmed with Lucene code to handle the search on my site ... the > articles indexed are those stored in a database, then I do a search with > "lucene.queryparser" on the field "code" of various objects (a "code" is a > word of 3 6-character) ... > > My problem is the fact that when I search, I am obliged to insert exactly > the real "code" to get a result. For example if in the database, I have an > object whose "code" is "lpg" , by typing "lp" in my textbox (for searching), > I get nothing ... I must enter the real entire code ... "lpg" > > In addition my research does not react with "figures" or characters such as > "_" > > How can I do? I think that the problem may be due to "analyzer" I chose? (I > tried to use "SimpleAnalyser" or "StandardAnalyser) > > > Thank you for your help! > > -- > View this message in context: > http://old.nabble.com/lucene-search-tp27358766p27358766.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org