0%

How to combine multiple filters: Boolean operators

Search parameters can be combined using logical operators:

  • To match both conditions, you specify filter1 AND filter2.
  • To match any one of the conditions, you specify filter1 OR filter2.

For example, to find documents with the marker symbol Prkdc and a p-value less than 10-4, you can use:

num_found, df = solr_request(
    core='statistical-result', 
    params={
        'q': 'marker_symbol:Prkdc AND p_value:[0 TO 1e-4]',
        'fl': 'marker_symbol,top_level_mp_term_name,effect_size,p_value',
        'rows': 3
    }
)