Webservice data adapter modifies the query body when :> or := are used ?

0

Hello,

I use the Webservice data adapter to query an elasticsearch nosql database. it seems that depending on the content of the initial query, I have sometimes a return from elastic and sometimes not.

https://community.jaspersoft.com/project/web-service-data-source for Jasper Report Server 6.3

After investigation I have found the reason. The query works in jasperstudio inside the Dataset And query dialog but inside the report it fails.

here is my body of my REST query (elasticsearch):

{
  "size": 0,
  "aggs": {
    "storages": {
      "filters": {
        "filters": {
          "LN2_storage": {
            "query_string": {
              "query":"sampletype:Urine AND nbr.aliquots:>=3",
              "analyze_wildcard": true,
              "default_field": "*"
            }
          },
          "ALL_storage": {
            "match_all": {}
          }
        }
      }
    }
  },
  "query": {
    "bool": {
      "must": [
        {
          "match_all": {}
        },
        {
          "query_string": {
            "query": "NOT _exists_:parents.1",
            "analyze_wildcard": true,
            "default_field": "*"
          }
        }
      ],
      "filter": [],
      "should": [],
      "must_not": []
    }
  }
}

The errors is located at  "query":"sampletype:Urine AND nbr.aliquots:>=3"

I think that the '>=' is interpreted somehow. I don't know why. May be it is considered as a parameter ?

I don't know How to overcome this issue.

Any clue welcome !

 

christophe.spielmann's picture
Joined: Feb 7 2014 - 8:42am
Last seen: 11 months 1 week ago

1 Answer:

0

tested something like nbr.aliquots:[1 TO 3] and it is the same

christophe.spielmann's picture
Joined: Feb 7 2014 - 8:42am
Last seen: 11 months 1 week ago
Feedback
randomness