weight value sources for pseudo-fields

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1136526 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2011-06-16 16:20:43 +00:00
parent fe7593efee
commit 4c5c3c86e2
1 changed files with 10 additions and 5 deletions

View File

@ -59,12 +59,17 @@ public class ValueSourceAugmenter extends DocTransformer
@Override
public void setContext( TransformContext context ) {
try {
IndexReader reader = qparser.getReq().getSearcher().getIndexReader();
readerContexts = reader.getTopReaderContext().leaves();
docValuesArr = new DocValues[readerContexts.length];
searcher = qparser.getReq().getSearcher();
this.fcontext = ValueSource.newContext(searcher);
fcontext = ValueSource.newContext(searcher);
this.valueSource.createWeight(fcontext, searcher);
} catch (IOException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
}
}