lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vietpd" <vie...@ht2d.com>
Subject Extending Query Parser
Date Sat, 14 Oct 2006 01:23:30 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message