IBX-5135: Added LocationDepth and IsMainLocation criterion parsers#50
IBX-5135: Added LocationDepth and IsMainLocation criterion parsers#50
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
|
Hello, @Steveb-p , please have a look at these queries: For LocationDepth: {
"ViewInput": {
"identifier": "TitleView",
"Query": {
"LocationFilter": {
"LocationDepth": {
"Value":
3
,
"Operator": "eq"
}
},
"limit": 300,
"offset": 0
}
}
}and {
"ViewInput": {
"identifier": "TitleView",
"Query": {
"LocationFilter": {
"LocationDepth": {
"Value":
1
,
"Operator": "eq"
}
},
"limit": 300,
"offset": 0
}
}
}For isMainLocation: {
"ViewInput": {
"identifier": "TitleView",
"Query": {
"LocationFilter": {
"IsMainLocation": "asdf"
}
,
"limit": 30,
"offset": 0
}
}
}and {
"ViewInput": {
"identifier": "TitleView",
"Query": {
"LocationFilter": {
"IsMainLocation": 1
}
,
"limit": 30,
"offset": 0
}
}
}Returned output is the same, seems like criterions dont work as expected. |
|
Also, for. the same queries run on elasticSearch im getting no items found. Example : {
"ViewInput": {
"identifier": "title",
"Query": {
"LocationFilter": {
"LocationDepth": {
"Value":
2
,
"Operator": "eq"
}
},
"limit": 300,
"offset": 0
}
}
}Output: {
"View": {
"_media-type": "application/vnd.ibexa.api.View+json",
"_href": "/api/ibexa/v2/views/title",
"identifier": "title",
"Query": {
"_media-type": "application/vnd.ibexa.api.Query+json"
},
"Result": {
"_media-type": "application/vnd.ibexa.api.ViewResult+json",
"_href": "/api/ibexa/v2/views/title/results",
"count": 0,
"time": null,
"timedOut": false,
"maxScore": null,
"searchHits": {
"searchHit": []
},
"aggregations": []
}
}
} |
44b47e8 to
87920d7
Compare
0e6f8e2 to
2ad17b3
Compare
|
Kudos, SonarCloud Quality Gate passed!
|
|
@Steveb-p I guess this PR could back to QA, am I right? |
|
@adamwojs we never figured out why exactly there is a discrepancy on the criteria, and the result they give. I suspect they are not working correctly in their base implementation, and REST responses probably are incorrect because of it. |
|
Looks like the key 'LocationFilter' from the request is not used anywhere in the code. |








v4.4This PR adds missing parsers for
LocationDepthandIsMainLocationcriterions.Example
IsMainLocation:{ "ViewInput": { "identifier": "TitleView", "Query": { "LocationFilter": { "IsMainLocation": 1 }, "limit": 10, "offset": 0 } } }Example
LocationDepth:{ "ViewInput": { "identifier": "TitleView", "Query": { "LocationFilter": { "LocationDepth": { "Value": [1], "Operator": "eq" } }, "limit": 10, "offset": 0 } } }TODO:
$ composer fix-cs).