lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincenzo D'Amore" <v.dam...@gmail.com>
Subject Re: Function Query Optimization
Date Sat, 12 Dec 2020 15:23:44 GMT
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 <jaejoo18@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message