Conjunction always using AND inside Condition Groups
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
Research direction
Start by reproducing the supplied GraphQL query with the Scenario 1–3 variables and compare the results. Trace how ConditionGroupInput conjunction is applied within and between the listed groups; done means Scenario 3 combines the two groups with OR and returns the expected union rather than zero results.
Written by the indexing model from the issue text.
Description
Hello,
Looks like conjunction inside just below Condition Groups is always taking AND, irrespective of conjunction supplied.
Main Query
query ($key: [String]!, $offset: Int!, $limit: Int!, $filters: ConditionGroupInput, $sort: [SortInput]) {
searchAPISearch(index_id: "myindex", condition_group: $filters, range: {offset: $offset, limit: $limit}, fulltext: {keys: $key}, sort: $sort) {
count: result_count
documents {
... on MyindexDoc {
group__title
content__content_title
}
}
}
}
Scenario 1 : Supplied query variables (giving expected result)
{
"offset": "0",
"limit": 50,
"key": "test",
"filters": {
"conjunction": "OR",
"groups": [
{
"conditions": [
{
"operator": "=",
"name": "content__content_type",
"value": "article"
},
{
"operator": "=",
"name": "content__field_is_application",
"value": "yes"
},
{
"operator": "<>",
"name": "content__field_life_cycle__entity__name",
"value": "Retired"
}
]
}
]
},
"sort": [
{
"field": "search_api_relevance",
"value": "desc"
}
]
}
Scenario 2 : Supplied query variables (giving expected result)
{
"offset": "0",
"limit": 50,
"key": "test",
"filters": {
"conjunction": "OR",
"groups": [
{
"conditions": [
{
"operator": ">",
"name": "group__id",
"value": "0"
},
{
"operator": "<>",
"name": "group__field_life_cycle__entity__title",
"value": "Retired"
},
{
"operator": "<>",
"name": "group__field_is_live",
"value": "0"
}
]
}
]
},
"sort": [
{
"field": "search_api_relevance",
"value": "desc"
}
]
}
Scenario 3 : Supplied query variables (giving 0 result, but it should be result of Scenario 1 + Scenario 2)
{
"offset": "0",
"limit": 50,
"key": "test",
"filters": {
"conjunction": "OR",
"groups": [
{
"conditions": [
{
"operator": "=",
"name": "content__content_type",
"value": "article"
},
{
"operator": "=",
"name": "content__field_is_application",
"value": "yes"
},
{
"operator": "<>",
"name": "content__field_life_cycle__entity__name",
"value": "Retired"
}
]
},
{
"conditions": [
{
"operator": ">",
"name": "group__id",
"value": "0"
},
{
"operator": "<>",
"name": "group__field_life_cycle__entity__title",
"value": "Retired"
},
{
"operator": "<>",
"name": "group__field_is_live",
"value": "0"
}
]
}
]
},
"sort": [
{
"field": "search_api_relevance",
"value": "desc"
}
]
}
What I assume conjunction just above groups always using AND operation between groups objects, but I want to use OR here.
Am I doing something wrong?
- Dominant language
- PHP
- Stars
- 10
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from drupal-graphql/graphql-search-api
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Graphql v4Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
drupal-graphql/graphql-search-api#55 · 4 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
-
Mulitvalued custom field results are incompletePossibly taken @carolpettirossi claimed this 2053 days ago. Openbug needs review/QA
drupal-graphql/graphql-search-api#40 · 1 comment · 1 assignee ·
-
Facets with LanguageOpenenhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
drupal-graphql/graphql-search-api#35 · 2 comments ·
All issues in drupal-graphql/graphql-search-api
Similar issues
-
ServiceMapMissingAnalyser reads @method in docblock prose as a tag and reports a phantom accessorOpenagent-ready area:static-analysis bug p3
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
gacela-project/gacela#1050 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
grokability/massdriver-server#38 ·
Maintainers usually reply within 1 day
-
bug review needed
Difficulty 1/5 Under an hour Newbie friendliness 86/100
OpenMage/magento-lts#5816 ·
Maintainers usually reply within 2 days
-
priority:low type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
crazy-goat/rabbit-stream#958 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pterodactyl/panel#7310 ·
Maintainers usually reply within 1 day