Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Alternatively the expressions can be encoded as URI path segments, see the sections below for more information.

Open Data Protocol

CXF 3.0.0-milestone2 supports the $filter query defined as part of Open Data Protocol, courtesy of Apache Olingo.

The $filter query can have a number of the logical operators, here is a summary of the operators supported in scope of Search API:

Operator

Description

"eq"

Equal

"ne"

Not Equal

"lt"

Less Than

"le"

Less or Equal

"gt"

Greater Than

"ge"

Greater or Equal

"and"

AND

"or"

OR

Please note that OData protocol is not supported by CXF Search API, only the $filter query is supported for querying the application data with CXF Search API. Users should work directly with Apache Olingo to get the OData protocol supported as part of the application flow.

When to use advanced queries.

...

Code Block
java
java
// Connecting composite or() and and() expressions will add "()" implicitly:
String ret = b.is("foo").equalTo(20, 10).and("bar").lessThan(10).query();
assertEquals("(foo==20,foo==10);bar=lt=10", ret);

// wrap() method can be used to wrap explicitly:

String ret = b.is("foo").equalTo(10).and("bar").lessThan(10).wrap().or("bar").greaterThan(25).query();
assertEquals("(foo==20;bar=lt=10),bar=gt=25", ret);


OData

 

Please work with Apache Olingo to produce OData queries from the code.

Using dates in queries

By default, the date values have to have the following format: "yyyy-MM-dd", for example:

...