It is working but I come across another problem. I am expecting same
parsedquery in the following two approaches but I am not getting it as same
Approach 1:
BooleanQuery myQuery = new BooleanQuery();
myQuery.add(new TermQuery(new Term("PATIENT_GENDER", "Male")),
BooleanClause.Occur
You could use LocalSolrQueryRequest to create the request, but it is not
necessary, if all what you need is to get the lucene query parser, just do:
import org.apache.lucene.queryparser.classic.QueryParser
qp = new QueryParser(Version.LUCENE_40, defaultField, new SimpleAnalyzer());
Query q = qp.p
Hi,
Thanks for the reply. In my application, I am using some servlets to receive
the request from user since I need to authenticate the user and adding
conditions like userid= before sending the request to Solr Server using
one of the two approaches
1) Using SolrServer
SolrServer server = ne
if you are inside solr, as it seems to be the case, you can do this
QParserPlugin qplug =
req.getCore().getQueryPlugin(LuceneQParserPlugin.NAME);
QParser parser = qplug.createParser("PATIENT_GENDER:Male OR
STUDY_DIVISION:\"Cancer Center\"", null, req.getParams(), req);
Query q = parser.parse();
Is there a way to get Lucene's query from Solr query?. I have a requirement
to search for terms in multiple heterogeneous indices. Presently, I am using
the following approach
try {
Directory directory1 = FSDirectory.open(new
File("E:\\database\\patient\\ind