Wildcards at the beginning of a term are prohibited using QueryParser
( ? is kind of * ), but
WildcardQuery may use leading wildcards (at the expense of performance).
Have a look at TestQuestionmark in TestWildcard.cs


On 4/4/07, Michael Paine <[EMAIL PROTECTED]> wrote:
I switched to using:

                Dim aQParser As QueryParser = New QueryParser("Body", New
Lucene.Net.Analysis.Standard.StandardAnalyzer())
                aQParser.SetDefaultOperator(QueryParser.Operator.AND)

                Dim aQuery As Query = aQParser.Parse(BodyQuery)
                bInnerQuery.Add(aQuery, BooleanClause.Occur.SHOULD)

..and when I search for:

m?croscope
m??roscope

the correct "microscope" word is found; but, when I search for:

?icroscope

System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> Lucene.Net.QueryParsers.ParseException: Lexical error at line
1, column 1.  Encountered: "?" (63), after : ""
  at Lucene.Net.QueryParsers.QueryParser.Parse(String query)

..occurs.  Any idea what I can do about this?

Thank you,
Michael



Reply via email to