the issue with non-letter characters is, indeed, the analyzer. Have a look at all the different subclasses of Analyzer in the javadocs, getting a copy of Luke will show you exactly what gets in your index, but KeywordAnalyzer and WhitespaceAnalyzer may work for you (but they don't normalize the case, you'll have to do that yourself).
And you can easily construct your own analyzer by stringing together tokenizers and filters. And don't forget PerFieldAnalyzerWrapper if you want different analyzers for different fields. HTH Erick 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 > >