-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
findEntitiesByProperty returns incorrect results #462
Comments
I've not been able to reproduce this with the latest code of the connector (which I don't believe has changed for quite some time)... Can you please confirm:
For example, when I run a query against all terms (POST to {
"class": "EntityPropertyFindRequest",
"typeGUID": "0db3e6ec-f5ef-4d75-ae38-b7ee6fd6ec0a",
"pageSize": 1
} I see the query is properly serialized, including the sort order:
(single-line JSON formatted for readability): {
"types": [
"term"
],
"properties": [
"abbreviation",
"additional_abbreviation",
"assigned_to_terms",
"created_by",
"created_on",
"example",
"glossary_type",
"is_modifier",
"language",
"long_description",
"modified_by",
"modified_on",
"name",
"native_id",
"referencing_categories",
"short_description",
"status",
"type",
"usage",
"workflow_current_state",
"workflow_stored_state"
],
"pageSize": 1,
"where": {
"conditions": [
{
"conditions": [
{
"property": "category_path.name",
"operator": "<>",
"value": "Classifications"
}
],
"operator": "and"
}
],
"operator": "and"
},
"sorts": [
{
"property": "_id",
"ascending": true
}
]
} |
Hi Chris, apologies for the late response. The first request that is made is the same that you posted and that one is fine, it works and the results are sorted. However the response from the above post looks something like this:
As you can see from the paging information, this page contains the first 1000 results out of 3000. From what I could get from the code, the next page of results is retrieved using a GET on the "next" url from the above response which contains the wrong serialisation for the query param sorts Edit: This was tested with the latest version of the connector code. Hope this helps, let me know if I can help with anything else. Thanks! |
So it makes sense now, and I've investigated further, and I think I can now reproduce -- the fundamental problem is that you get the same results for multiple pages, right? To your point above, it's a bit confusing because of url-encoding...
What you've outlined above looks indeed like a problematic URL, as I can see that everything after the However, looking at the code of the I've also gone ahead and extended the tests ( Line 1230ish in
(Note everything is After the restructuring, I then have:
(Note that the initial So at least the URL itself appears to be correctly sent along each time. With this, I can see that the sort criteria is passed along into the second page of results; however I did observe that the sorting is for some reason dropped from that second page of results onwards -- and that this happens in IGC itself. Could you try to reproduce the behaviour you are observing using only the IGC REST API directly? I believe there is a bug in IGC itself where this sort criteria is not being passed along across all pages, and this would help confirm it for your particular scenario. |
While executing initial load, we noticed that not all the GlossaryTerms are retrieved from IGC to be processed. We are trying to retrieve 3000+ terms and the maxPageSize is set to 1000 results which means the results are retrieved in pages.
The search endpoint from IGC does not have the expected behaviour. The first search page is sorted by _id however when the following pages are retrieved using the next page url provided in the IGC response body, the results are no longer sorted and this causes terms to not be included in the response and others to be duplicated.
I have modified the connector code on my local environment to not use any sorting property for the first page and this results in retrieving all the GlossaryTerms.
The next page URL contains the following query parameter:
sorts : SearchSort{property='_id', ascending=true}
which seems to do nothing. I have manually tried the queries using insteadsorts : [{"property": "_id","ascending": true}]
and this sorts the results correctly.IGC info:
Version 11.7.1SP2
Build 11.7.1SP2-dev_b164_cc72b37fee5a
If more info is needed, please let me know
The text was updated successfully, but these errors were encountered: