On Wed, Jun 26, 2013 at 4:02 PM, Arun Rangarajan
<arunrangara...@gmail.com> wrote:
> http://docs.lucidworks.com/display/solr/Working+with+External+Files+and+Processes
> says
> this about external file fields:
> "They can be used only for function queries or display".
> I understand how to use them in function queries, but how do I retrieve the
> values for display?
>
> If I want to fetch only the values of a single external file field for a
> set of primary keys, I can do:
> q=_val_:"EXT_FILE_FIELD"&fq=id:(doc1 doc2 doc3)&fl=id,score
> For this query, the score is the value of the external file field.
>
> But how to get the values for docs that match some arbitrary query?

Pseudo-fields allow you to retrieve the value for any arbitrary
function per returned document.
Should work here, but I haven't tried it.

fl=id, score, field(EXT_FILE_FIELD)

or you can alias it:

fl=id, score, myfield:field(EXT_FILE_FIELD)

-Yonik
http://lucidworks.com

Reply via email to