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

Different resources or #90

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

khaledk2
Copy link
Collaborator

@khaledk2 khaledk2 commented Jun 5, 2023

This Pr fix issue #89.
@will-moore I has been deployed it on id-testing, could you please test it and let me know how is it going?

@will-moore
Copy link
Member

@khaledk2
Copy link
Collaborator Author

khaledk2 commented Jun 5, 2023

@will-moore Could you please test the other query?

@will-moore
Copy link
Member

Yes - The following query now returns 15 studies as expected (which includes idr0066 with the 2 images from the images search):

{
  "resource": "image",
  "query_details": {
    "and_filters": [],
    "or_filters": [
      [
        {
          "value": "light sheet",
          "operator": "contains",
          "resource": "image"
        },
        {
          "value": "light sheet",
          "operator": "contains",
          "resource": "container"
        }
      ]
    ],
    "case_sensitive": false
  },
  "mode": "searchterms"
}

So it's looking good. I need to find an example where the images returned are not included in the studies - to check if the OR is really working....

@khaledk2
Copy link
Collaborator Author

@will-moore I think the following two queries may be used to test OR clauses for different recourses as the images are included in a separate study/studies, what do you think?

{
  "resource": "image",
  "query_details": {
    "and_filters": [],
    "or_filters": [
      [
        {
          "name": "Organism",
          "value": "schizosaccharomyces pombe",
          "operator": "equals",
          "resource": "container"
        },
        {
          "name": "Cell Line",
          "value": "nmumg",
          "operator": "equals",
          "resource": "image"
        }
      ]
    ],
    "case_sensitive": false
  },
  "mode": "searchterms"
}

{
  "resource": "image",
  "query_details": {
    "and_filters": [],
    "or_filters": [
      [
        {
          "name": "Organism",
          "value": "schizosaccharomyces pombe",
          "operator": "equals",
          "resource": "container"
        },
        {
          "name": "Cell Line",
          "value": "mouse embryonic stem cell",
          "operator": "equals",
          "resource": "image"
        }
      ]
    ],
    "case_sensitive": false
  },
  "mode": "searchterms"
}

@will-moore
Copy link
Member

@khaledk2 those queries look good and seem to be working on idr-testing now 👍

@khaledk2 khaledk2 requested a review from jburel May 29, 2024 15:45
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.

2 participants