@Override public FuncValues getValues(QueryContext context, AtomicReaderContext readerContext) throws IOException { if (context.get(this) == null) { SolrRequestInfo requestInfo = SolrRequestInfo.getRequestInfo(); throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "testfunc: unweighted value source detected. delegate=" + source + " request=" + (requestInfo == null ? "null" : requestInfo.getReq())); } return source.getValues(context, readerContext); }
@Override public void createWeight(QueryContext context) throws IOException { context.put(this, this); }