-
Notifications
You must be signed in to change notification settings - Fork 67
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
Adds new v4 autocomplete search endpoint #734
Conversation
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
docker/manage
Outdated
# build-db() { | ||
# # | ||
# # db | ||
# # | ||
# echo -e "\nBuilding vcr-postgresql image ..." | ||
# ${S2I_EXE} build \ | ||
# --copy \ | ||
# -e "HTTP_PROXY=${HTTP_PROXY}" \ | ||
# -e "HTTPS_PROXY=${HTTPS_PROXY}" \ | ||
# '../server/db/config' \ | ||
# 'registry.access.redhat.com/rhscl/postgresql-10-rhel7:latest' \ | ||
# 'vcr-postgresql' | ||
# } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well delete it.
docker/manage
Outdated
@@ -229,7 +229,7 @@ build-echo-app() { | |||
|
|||
build-all() { | |||
build-solr | |||
build-db | |||
# build-db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well delete it.
@@ -67,13 +67,16 @@ def get_remote_name(self): | |||
def all_names(self): | |||
return self._cached("names", self.names.all()) | |||
|
|||
# DEPRECATED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a better way to mark this property as deprecated, so that it will actually cause a warning when used/referenced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh we could just remove this too. It's not actually referenced anywhere
I get an error starting the services (I think due to the database change?):
(The property names changed for the postgres user, password, etc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deleted and rebuilt the images, and I confirmed that the databases are all running against postgres:14, but the vcr-agent fails on startup when trying to create its wallet.
Did you have an instance running prior? I've noticed that if I don't tear down and remove all volumes I run into the problem of the wallet already existing. |
Yes I cleaned up all old images, volumes etc. |
docker/manage
Outdated
# --copy \ | ||
# -e "HTTP_PROXY=${HTTP_PROXY}" \ | ||
# -e "HTTPS_PROXY=${HTTPS_PROXY}" \ | ||
# '../server/db/config' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these configs getting applied to the new database?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They aren't, no.
I notice I can't login to the running database using |
Wallet db startup - you can see the failed postgres login at the end:
|
Ok I see the error now |
Hey @amanji -- is one of the options for this to filter based on a topic (entity) having a specific type of credential? Not crucial, but that is a feature we've talked about in the past. If that does (or can easily) come for free with this, it would be awesome. For example, search within all of those entities that have a Cannabis Marketing license. Thanks! Great work regardless! |
We'd need to add a filter for that but I should be able to extend the options similar to the other topic search endpoints. |
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
@swcurran Filters have been added, we now should be able to filter by Issuer ID, Credential IDs held by the topic and the Type ID of the Topic itself along with Categorical fields such as entity type etc. |
Way cool! @ianco -- hopefully you can get this reviewed and approved sometime soon. |
I get these startup errors:
|
... I assume the changes to the |
@ianco Yeah. I have the Black formatting extension in my code editor. Is there a specific style formatter we generally use? |
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
@ianco I see the same output: But it looks to do with the webhooks code. I would suggest we do a followup PR to apply a consistent formatter to the codebase. |
Not sure how to filter by category? I tried |
@ianco It should be like the regular search filtering so try |
The If we don't want to change this endpoint then we should include the id in the autocomplete search results. |
I can add |
Tried this it didn't have any affect on the search outputs (entity type |
What do your Topic indexes look like in Solr? |
Screen.Recording.2022-09-23.at.10.44.03.AM.movHere's an example of the search filter in action. Not your Topic indexes should look like: {
"id":"api_v2.topic.3",
"django_ct":"api_v2.topic",
"django_id":"3",
"topic_source_id":"BC0014947",
"topic_issuer_id":2,
"topic_type_id":2,
"topic_inactive":false,
"topic_revoked":false,
"topic_name":["BC0014947",
"PATTISON SECURITIES LIMITED"],
vvv
"topic_category":["registration_id::BC0014947",
"entity_name::PATTISON SECURITIES LIMITED",
"entity_status::ACT",
"entity_type::BC",
"home_jurisdiction::BC",
"reason_description::Event:CONVICORP"],
^^^
"topic_credential_type_id":[2],
"topic_all_credentials_inactive":false,
"topic_all_credentials_revoked":false,
"_version_":1744782618584416256
} |
Screen.Recording.2022-09-23.at.2.37.37.PM.movAn example of entity_type filters being applied along with a name suggestion directly on topic. This could obviate the need to have names and addresses indexed since the information is available directly in the Topic index. |
Signed-off-by: Akiff Manji <akiff.manji@gmail.com>
Inconsistent results between the
The
None of the api's include params to adjust the page size or offset, but the |
Tried again and one of the returned corps was As an aside the comment on this param in the swagger page is |
This PR adds a new search endpoint for autocomplete searching (v4):
?category:entity_type=ULC