nathandunn / galaxy-monarch-integration

BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

allow multiple inputs #11

Closed nathandunn closed 8 years ago

nathandunn commented 8 years ago

GOLR should allow "OR" clauses in queries

nathandunn commented 8 years ago

The default is that these are "AND" closures.

nathandunn commented 8 years ago

for AND, this is done at the SOLR level we should be able to do fq=<1>&fq=<2>

for the OR case, it would be fq=(<1>OR<2>)

in both cases it is fq=subject_closure:DOID:123 or the like.

nathandunn commented 8 years ago

https://solr.monarchinitiative.org/solr/golr/select?defType=edismax&qt=standard&indent=on&wt=csv&rows=100000&start=0&fl=subject,subject_label,subject_taxon,subject_taxon_label,relation,relation_label,object,object_label,evidence,evidence_label,source,is_defined_by,qualifier&facet=true&facet.mincount=1&facet.sort=count&json.nl=arrarr&facet.limit=25&facet.method=enum&csv.encapsulator=&csv.separator=%09&csv.header=true&csv.mv.separator=%7C&fq=(object_closure:%22Orphanet:255249%22%20OR%20object_closure:%22DOID:14330%22)&fq=subject_category:%22gene%22&fq=object_category:%22disease%22&facet.field=subject_taxon_label&q=:

with the "OR" it is correct: 141 -1 = 140

with the "AND" it is 0

with DOID:14430 it is 131 -1 = 130

Orphanet:255249 it is 11 - 1 = 10

So, predictably no overlap in records.

nathandunn commented 8 years ago

if I replace with an AND . . I get the expected result (the same as the individual) and it provides an intersection.