mskcc / smile-server

2 stars 4 forks source link

Make dashboard searches case insensitive #1263

Closed qu8n closed 3 weeks ago

qu8n commented 2 months ago

Right now, cancerType and cancerTypeDetailed are the only fields that we support case-insensitive search because we handle their search manually.

GraphQL doesn't natively support case-insensitive searching. We might be able to either (1) look for an external, GraphQL-related library that supports this feature, or (2) handle this somehow in the resolver.

ao508 commented 2 months ago

Please add your planning poker estimate with Zenhub @qu8n

ao508 commented 1 month ago

PAUSED FOR THE TIME BEING

Neo4j pattern matching is supported in graphql for Neo4j v5.x.x which will require a major db version migration on our part.

It's recommended to incrementally migrate db versions. Ours is at 4.4.23 (need to double check how many migration steps this would require to reach 5.19.0)

The latest Neo4j version is v5.23.0 but APOC is supported up until v5.19.0 so far which is motivation for only migrating up to v5.19.0.

Resources and things to keep in mind:

Steps run:

  1. using docker... make a database dump for the current version of the database (neo4j:4.4.23)
  neo4j-admin-dump:
    container_name: neo4j-admin-dump
    image: neo4j/neo4j-admin:4.4.23
    restart: unless-stopped
    environment:
      - NEO4J_AUTH=${NEO4J_USERNAME}/${NEO4J_PASSWORD}
      - NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
      - NEO4J_dbms_allow__upgrade=true
    command: neo4j-admin dump --database=neo4j --to=/downloads/neo4j.dump
    volumes:
      - type: bind
        source: /Users/laptop/data/neo4j/data
        target: /data
      - type: bind
        source: /Users/laptop/data/neo4j/import
        target: /import
      - type: bind
        source: /Users/laptop/data/neo4j/logs
        target: /logs
      - type: bind
        source: /Users/laptop/data/neo4j/plugins
        target: /plugins
      - type: bind
        source: /Users/laptop/data/neo4j/downloads
        target: /downloads

because of the bind mounting, the data dump will be written to the mounted /downloads path

  1. downloaded neo4j 5.19.0 community edition (as tar.gz, not using the neo4j desktop app)
  2. from the unpacked directory:
# migrate the database
laptop@LSKI3053 neo4j-community-5.19.0 % bin/neo4j-admin database migrate neo4j

# load the database
neo4j-community-5.19.0 % bin/neo4j-admin database load neo4j --from-path=/Users/laptop/data/neo4j/downloads
  1. Launch neo4j like normal via docker-compose, making sure to update the image to 5.19.0