Skip to content

Instantly share code, notes, and snippets.

@JnBrymn
Last active October 11, 2018 07:41
Show Gist options
  • Save JnBrymn/5482167 to your computer and use it in GitHub Desktop.
Save JnBrymn/5482167 to your computer and use it in GitHub Desktop.
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