lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Aroush" <geo...@aroush.net>
Subject RE: Extending Query Parser
Date Sun, 15 Oct 2006 23:36:42 GMT
Hi,

Can you please provide an example of how this code is causing you a problem?

The Java version of this code is exactly the same, and has been the same (in
both Java and C#) since 1.4 release (maybe earlier but I haven't checked
that far.)

Regards,

-- George Aroush


-----Original Message-----
From: Vietpd [mailto:vietpd@ht2d.com] 
Sent: Friday, October 13, 2006 9:24 PM
To: 'Archives'
Subject: Extending Query Parser

There is one problem in the query parser that I have just found.
In the Query(string field) method of the QueryParser class, I found this
snippet:
if (clauses.Count == 1 && firstQuery != null)

{

      if (true)

            return firstQuery;

}

else

{

      {

            if (true)

                  return GetBooleanQuery(clauses);

      }

}
If the if clause is true, then the GetBooleanQuery is not called. Therefore,
if I extend QueryParser I cannot catch this case in the GetBooleanQuery
method, the flow of method calling (AddClause --> GetBooleanQuery) is
broken. I think you should call GetBooleanQuery in all case in Query(string
field) method, that make the flow of method calling, so that, It will be
comfortable for extending QueryParser

 



Mime
View raw message