How do I do complex queries where I have to search by two fields? My query is below but I think somehow it is incorrect because it does not work. It extracts information matching to gene_info.symbol but does not return for that one sample id, instead it returns for all sample ids:
# fields to return
> print(body)
"{\"_source\": [\"gene_info.symbol\",\"samples.sample_id\",\"samples.rsem.fpkm\",\"gene_info.biotype\"]}"
# fields to query
> print(query)
"gene_info.symbol:(A1BG OR PDK1) AND samples.sample_id:(C021_0001_20140916_tumor_RNASeq)"
out <- Search(index = myindexname,
type = typename,
q = query,
body = body,
raw = TRUE)
How do I do complex queries where I have to search by two fields? My query is below but I think somehow it is incorrect because it does not work. It extracts information matching to gene_info.symbol but does not return for that one sample id, instead it returns for all sample ids:
This is the structure of the JSON:
Using my query, I am unable to retrieve the specific samples.