Any One On Thu, Jan 27, 2011 at 1:27 PM, Ahson Iqbal <mianah...@yahoo.com> wrote:
> Hi All > > I want to integrate lucene Surround Query Parser with solr 1.4.1, and for > that I > am writing Custom Query Parser Plugin, To accomplish this task I should > write a > sub class of "org.apache.solr.search.QParserPlugin" and implement its two > methods > > public void init(NamedList nl) > public QParser createParser(String string, SolrParams sp, SolrParams sp1, > SolrQueryRequest sqr) > > now here createParser should return an object of a subclass of > "org.apache.solr.search.QParser", but I need a parser of type > "org.apache.lucene.queryParser.surround.parser.QueryParser" which is not a > subclass of "org.apache.solr.search.QParser" > > Now my question is should I write a sub class > of "org.apache.solr.search.QParser" and internally create an object > of "org.apache.lucene.queryParser.surround.parser.QueryParser" and call its > parse method? if so how the mapping > "org.apache.lucene.queryParser.surround.query.SrndQuery" (that is > returned "org.apache.lucene.queryParser.surround.parser.QueryParser" ) > would be > done with "org.apache.lucene.search.Query" (that should be returned from > parse > method of a query parser of type "org.apache.solr.search.QParser") > > Thanx > Ahsan > > >