Hi Michael Thanks, I finally found my problem. The final query text executed by Lucene QueryParser was accidentally modified by another function. using wildcard query is okay and no problem so far.
Thanks. Floyd 2009/12/10 Michael Garski <mgar...@myspace-inc.com> > Be sure to use the same analyzer at search time that you do at index > time. The StandardAnalyzer will keep the numbers and allow you to > search for the text "2009123" in the field "title" with "title:2009123" > or "title:2009*". I'm not sure why you are having difficulty using the > wildcard query. > > Wildcard queries do not perform the best if you have a large number of > terms that could match the wildcard. If that is the case you will want > to alter the analysis of your text. > > Michael > > -----Original Message----- > From: Floyd Wu [mailto:floyd...@gmail.com] > Sent: Sunday, December 06, 2009 7:44 PM > To: lucene-net-user@incubator.apache.org > Subject: Re: How to search number in text field? > > Hi Michael > > The query is constructed using QueryText. > Partial of my code as floowing > > string queryText = "title:2009123"; > QueryParser parser = new QueryParser(SpecialFields.Title, Analyzer); > parser.SetLowercaseExpandedTerms(false); > Lucene.Net.Search.Query query > =parser.Parse(queryText); > searcher.Search(query); //searcher is an IndexSearcher instance > > Floyd > > > > 2009/12/5 Michael Garski <mgar...@myspace-inc.com> > > > Floyd, > > > > How are you constructing the query? > > > > Michael > > > > -----Original Message----- > > From: Floyd Wu [mailto:floyd...@gmail.com] > > Sent: Thursday, December 03, 2009 10:33 PM > > To: lucene-net-user@incubator.apache.org > > Subject: How to search number in text field? > > > > Hi all, > > When using StandardAnalyzer indexing documents, Lucene.Net did not > > search > > for numbers in text fields with numbers. > > For example, I have built a index which title is 2009123. > > Fire the querystring as "title:2009" returns no records and even if > > using > > title:2009* > > There does exist record with title value=2009123; > > How can I search this record when my client really want to use 2009 as > > keyword for searching? > > > > Thanks > > > > Floyd > > > > > >