Now I found what cause my problem. The CLucene standard analyzer separate the "3d model" in to three tokens: "3" , "d" and "model" . but Lucene.net standard analyzer separate it into two tokens: "3d" and "model". They are incompatible.
http://old.nabble.com/A-problem-of-searching-word-"3D"-with-Lucene.net-to27316636.html#a27352654<http://old.nabble.com/A-problem-of-searching-word-%223D%22-with-Lucene.net-to27316636.html#a27352654> On Wed, Jan 27, 2010 at 3:18 PM, digy digy <[email protected]> wrote: > I don't agree with it. > Try this code to see what is to be indexed: > > *Analyzer stdAnalyzer = new StandardAnalyzer();* > * TokenStream ts = stdAnalyzer.TokenStream("", new > System.IO.StringReader("3D model"));* > * Token token = ts.Next();* > * while ( token!=null )* > * {* > * System.Diagnostics.Debug.WriteLine(token.Term());* > * token = ts.Next();* > * }* > > > DIGY > > On Wed, Jan 27, 2010 at 3:08 AM, Li Bing <[email protected]> wrote: > > > According to my experiences, "3D" should not be indexed in fields > > since it starts with a number. If you have to do so, you can try > > "threeD". When retrieving "3D", you need to convert it to "threeD" > > first. > > > > Thanks, > > LB > > > > On Wed, Jan 27, 2010 at 8:55 AM, Qizhen Ruan <[email protected]> > wrote: > > > Hi All, > > > > > > I have created an index file with CLucene. I'm now using Luenen.net > > 2.3.2 > > > to query the index. While searching key word "3D", it returns 0 > results. > > > But my target file do have includes words like "3D model". I used the > > > standard analyzer for indexing and searching. > > > If I search a pure numeric, it do return correct results. > > > > > > Anyone knows how to search "3D"? > > > > > > Thanks a lot! > > > Qizhen > > > > > >
