On 16/07/13 15:52, nikosdim wrote:
I see what you mean but according to your previous post shouldn't the
"search.lax.property.match" property force the parser to ignore any
properties that are not included in the beanPropertiesMap?

SQLPrinterVisitor<Booki> visitor = new SQLPrinterVisitor<Book>(
                      beanPropertiesMap, "books", cols);

This property works at a different level, what happens, assuming the actual FIQL expression is correct, is that FIQL parser will attempt to inject a property with name 'records' into Book class, and, by default, it will throw a PropertyException if Book has no 'records' property, unless "search.lax.property.match" is enabled.

In your case, you have an expression like "author==Peter;records=20", note ';' is also part of FIQL language, but while "author==Peter" is OK, "records=20" is not, so the exception is thrown but at the moment 'null' SearchCondition is returned. On one hand it is reasonable because most sites won't return back an HTTP error if a user has mistyped the query: better return some default response along the lines 'the query is mistyped, try again, etc' or offer some default view of authors.

One just needs to check if SearchCondition is null. That said, I will also optionally throw the exceptions (reporting on the wrong properties) so that implementations can offer more detailed info if preferred.

This also made me thinking that may be this part:
http://cxf.apache.org/docs/jax-rs-search.html#JAX-RSSearch-PlainqueriestoFIQLconversion

needs to be enhanced a bit so that encoded <, >, <=, >= are also supported, and then, when we have path segments, then we also support plain '=', I'll experiment a bit


Sergey



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Where-to-put-contextual-property-ignore-matrix-parameters-true-tp5730881p5730953.html
Sent from the cxf-user mailing list archive at Nabble.com.



--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to