Last active
October 11, 2018 07:41
-
-
Save JnBrymn/5482167 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WimpySwanQParser extends QParser { | |
public WimpySwanQParser(String qstr, SolrParams localParams, | |
SolrParams params, SolrQueryRequest req) { | |
super(qstr, localParams, params, req); | |
} | |
@Override | |
public Query parse() { | |
WimpySwanParser parser = | |
Parboiled.createParser(WimpySwanParser.class); | |
ParsingResult<?> result = new RecoveringParseRunner<SpanQuery>( | |
parser.Query()).run(this.qstr); | |
SpanQuery node = (SpanQuery) result.parseTreeRoot.getValue(); | |
return query; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment