Skip to content
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

updated response/param values #95

Merged
merged 2 commits into from
Jul 11, 2022
Merged

Conversation

kialj876
Copy link
Collaborator

@kialj876 kialj876 commented Jul 8, 2022

Signed-off-by: Kial Jinnah kialjinnah@gmail.com

Issue #: /bcgov/entity#12482

Description of changes:
example of urls:
/businesses/search/facets?query=test c&start=0&rows=15&categories=legalType:CP,bc,ben::status:ACTIVE,historical
/businesses/search/parties?query=test p&categories=partyRoles:partner,proprietor&rows=100
/businesses/search/suggest?query=001&rows=20&highlight=true

example of facets resp:

{
    "facets": {
        "fields": {
            "legalType": [{"count": 58, "value": "CP"},...],
            "status": [{"count": 81,"value": "ACTIVE"},...]
        }
    },
    "searchResults": {
        "queryInfo": {
            "categories": {
                "legalType": [
                    "CP",
                    "bc",
                    "ben"
                ],
                "status": [
                    "ACTIVE",
                    "historical"
                ]
            },
            "query": "test c",
            "rows": 15,
            "start": 0
        },
        "results": [
            {
                "identifier": "CP1002397",
                "legalType": "CP",
                "name": "TEST COOP",
                "score": 5.1154404,
                "status": "HISTORICAL"
            },...
        ],
        "totalResults": 96
    }
}

example of parties resp:

{
    "facets": {
        "fields": {
            "parentLegalType": [{"count": 4,"value": "SP"},...],
            "parentStatus": [{"count": 5,"value": "ACTIVE"},...],
            "partyRoles": [{"count": 4,"value": "proprietor"},...]}
    },
    "searchResults": {
        "queryInfo": {
            "categories": {
                "parentLegalType": [
                    "SP",
                    "gp"
                ],
                "parentStatus": [
                    "active"
                ],
                "partyRoles": [
                    "partner",
                    "proprietor"
                ]
            },
            "query": "test",
            "rows": 100,
            "start": 0
        },
        "results": [
            {
                "parentBN": "993539402",
                "parentIdentifier": "FM1000034",
                "parentLegalType": "SP",
                "parentName": "SOLO DIS 1.6",
                "parentStatus": "ACTIVE",
                "partyName": "TEST PROP PROP LNAME",
                "partyRoles": [
                    "proprietor"
                ],
                "partyType": "person"
            },...
        ],
        "totalResults": 5
    }
}

example of suggest resp:

{
    "queryInfo": {
        "highlight": true,
        "query": "001",
        "rows": 20
    },
    "results": [
        {
            "type": "name",
            "value": "<b>001</b>8505 B.C. LTD."
        },...
    ]
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the PPR license (Apache 2.0).

kialj876 added 2 commits July 7, 2022 18:15
Signed-off-by: Kial Jinnah <kialjinnah@gmail.com>
Signed-off-by: Kial Jinnah <kialjinnah@gmail.com>
@kialj876 kialj876 self-assigned this Jul 8, 2022
@kialj876
Copy link
Collaborator Author

kialj876 commented Jul 8, 2022

/gcbrun

@codecov
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #95 (97598c1) into main (a4b0d54) will decrease coverage by 0.49%.
The diff coverage is 51.61%.

@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
- Coverage   71.08%   70.59%   -0.50%     
==========================================
  Files          54       54              
  Lines        1643     1653      +10     
  Branches      199      208       +9     
==========================================
- Hits         1168     1167       -1     
- Misses        437      441       +4     
- Partials       38       45       +7     
Flag Coverage Δ
search-api 70.59% <51.61%> (-0.50%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...i/src/search_api/resources/v1/businesses/search.py 66.66% <46.42%> (-8.89%) ⬇️
...arch-api/src/search_api/request_handlers/search.py 86.88% <100.00%> (+0.21%) ⬆️
search-api/src/search_api/version.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f90a2ce...97598c1. Read the comment docs.

Copy link
Collaborator

@thorwolpert thorwolpert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.
thanks for adding the examples, they reflect my understanding from the end of our design meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants