@@ -117,20 +117,19 @@ def test_fuzzy_search(self):
117117 'query' : {
118118 'bool' : {
119119 'should' : [
120- {'match' : {'phenotype' : 'HP:0000252' }}, # Microcephaly
121- {'match' : {'phenotype' : 'HP:0000522' }}, # Alacrima
122- {'match' : {'phenotype' : 'HP:0012639' }}, # Abnormal nervous system morphology
123- {'match' : {'phenotype' : 'HP:0100022' }}, # Movement abnormality
124- {'match' : {'phenotype' : 'HP:0002650' }}, # Scoliosis
125- {'match' : {'gene' : 'NGLY1' }},
120+ {'match' : {'phenotype' : 'HP:0001250' }}, # Seizures
121+ {'match' : {'phenotype' : 'HP:0006852' }}, # Eposodic hypotonia
122+ {'match' : {'phenotype' : 'HP:0011675' }}, # Arrhythmia
123+ {'match' : {'phenotype' : 'HP:0003312' }}, # Abnormal vertebra
124+ {'match' : {'gene' : 'GPX4' }},
126125 ]
127126 }
128127 }
129128 }
130129 results = self .es .search (index = 'patients' , body = query )
131130 hits = results ['hits' ]['hits' ]
132- self . assertEqual ( hits [ 0 ][ '_id' ], 'P0001070' )
133- self .assertGreater (hits [0 ]['_score ' ], hits [ 1 ][ '_score' ] )
131+ # Most similar patient from test dataset
132+ self .assertEqual (hits [0 ]['_id ' ], 'P0001059' )
134133
135134
136135class DatastoreTests (TestCase ):
0 commit comments