java - How to access the underlying Lucene index in ElasticSearch custom handler? -
my current project involves search on highly customised solr indices. turns out best way query use lucene api. in solr, can access underlying lucene index using:
public void process(responsebuilder responsebuilder) throws ioexception { solrindexsearcher sir = responsebuilder.req.getsearcher(); booleanquery bq = new booleanquery(); query tq = new termquery(new term("content", "test")); bq.add(tq, booleanclause.occur.must); topdocs td = sir.search(bq, 20); } now, elasticsearch seems hide lucene functionalities. there way expose lucene index @ es query handler level, or query example above (i.e. direct querying on index fields) using es api?
Comments
Post a Comment