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

Bugfix advanced params #28

Merged
merged 3 commits into from
Feb 27, 2024
Merged

Bugfix advanced params #28

merged 3 commits into from
Feb 27, 2024

Conversation

NISH1001
Copy link
Collaborator

Major Fixes:

  • Removes the keys operator and value in pynequa.AdvanedParams payload generation if they are empty/none/null. This fixes the issue when we want to filter (say by "collection") and we don't want to apply any operator.

Sample:

{
    'app': 'vanilla-search',
    'query': {
        'name': 'query',
        'text': 'himawari',
        'isFirstpage': False,
        'strictRefine': False,
        'removeDuplicates': False,
        'action': 'search',
        'page': 1,
        'pageSize': 10,
        'advanced': {
            'collection': '/user_needs_database/snwg-assessments-2020/',
            # 'value': None, 'operator': None,
        }
    }
}

Sample:

```python
{
    'app': 'vanilla-search',
    'query': {
        'name': 'query',
        'text': 'himawari',
        'isFirstpage': False,
        'strictRefine': False,
        'removeDuplicates': False,
        'action': 'search',
        'page': 1,
        'pageSize': 10,
        'advanced': {
            'collection': '/user_needs_database/snwg-assessments-2020/',
            # 'value': None, 'operator': None,
        }
    }
}
```
Now col_name and values are checked to see if empty.
pynequa/models.py Outdated Show resolved Hide resolved
pynequa/models.py Outdated Show resolved Hide resolved
@anisbhsl anisbhsl linked an issue Feb 27, 2024 that may be closed by this pull request
@anisbhsl anisbhsl merged commit 4fabf47 into develop Feb 27, 2024
1 check passed
@anisbhsl anisbhsl deleted the bugfix/advanced-params branch February 27, 2024 22:06
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.

Add support for multiple AdvancedParams in QueryParams payload
2 participants