Hi, looking at this sample it seems you have just one document for '12345',
one for '23456' and so on so forth. If this is true, why don't just try
with a subquery
https://lucene.apache.org/solr/guide/6_6/transforming-result-documents.html#TransformingResultDocuments-_subquery_

On Fri, Dec 11, 2020 at 3:31 PM Jae Joo <jaejo...@gmail.com> wrote:

> I have the requirement to create field  - xyz to be returned based on the
> matched result.
> Here Is the code .
>
> XYZ:concat(
>
>     if(exists(query({!v='field1:12345'})), '<G>12345</G>', ''),
>
>     if(exists(query({!v='field1:23456'})), '<G>23456</G>', ''),
>
>     if(exists(query({!v='field1:34567'})), '<G>34567</G>', ''),
>
>     if(exists(query({!v='field:45678'})), '<G>45678</G>','')
> ),
>
> I am feeling this is very complex, so I am looking for some smart and
> faster ideas.
>
> Thanks,
>
> Jae
>


-- 
Vincenzo D'Amore

Reply via email to