Hi All,

I have a written a custom solr function and I would like to read a property
of the document inside my custom function. Is it possible to get that using
Solr?

For eg. inside the floatVal method, I would like to get the value of the
attribute "name"

public class CustomValueSource extends ValueSource {

@Override
public FunctionValues getValues(Map context,
AtomicReaderContext readerContext) throws IOException {
 return new FloatDocValues(this) { @Override public float floatVal(int doc)
{
/*******
 getDocument(doc).getAttribute("name")

********/ }}}

Thanks & Regards
Mukund

Reply via email to