Closed komalsrathi closed 7 years ago
hi @komalsrathi ! thanks for your question 😸
can you share your elastic
pkg version and Elasticsearch version with me?
Does elastic
R pkg and doing the same query in browser or with e.g., curl on command line give the same answer?
R package version: elastic_0.7.8.9499
. I am pretty sure my Elastic search version is >=5 because I don't have nested querying enabled which is why I cannot do simple curl statements - I think that is something the admin is working on currenly. However the same query in the browser, returns the same output as elastic
R package.
thx, can get Elasticsearch ver doing elastic::ping()
Thanks! It is 5.2.2
try this for example
library(elastic)
connect()
plosdat <- system.file("examples", "plos_data.json", package = "elastic")
invisible(docs_bulk(plosdat))
body <- '{
"query":{
"bool" : {
"should" : {
"match" : {
"title" : "cells"
}
}
}
}}'
Search("plos", body = body)
should do exact match for you
Another question - can you do this for nested queries as well?
you should be able to do anything you can do as if you were doing curl requests or using python library, etc
I am trying to query the database using:
The problem is I am not just getting strict matching and it returns
A2M
as well asA2M-AS1
. What's more confusing is that if I query forA2M-AS1
, I still get both. I tried this with other gene symbols likeA1BG
andA1BG-AS1
and still facing the issue.Could it be related to the database schema?
Any help would be much appreciated!