You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by mganeshs <mg...@live.in> on 2020/05/18 13:04:46 UTC

Fetch related documents from Custom Function

Is there a easy possibility of reading the few field from related documents
from Custom function ? 

For ex, Project document contains, project id, project name, Project manager
id  ( which is nothing but employee id ). & Employee document contains field
( Employee id, Employee name ). Now while querying the Project documents, in
a custom function want to pass project manager id, and would like to read
employee document of that Project manager and return employee name of that
project manager. 

WE can do Join, but for various reason, for me Join won't work. So would
like to read the employee document from the custom function. As Custom
function is getting executed inside SOLR, what's the easy to read the other
documents in SOLR, instead of establishing new connection via solrj and read
it.

Thanks in advance.



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Fetch related documents from Custom Function

Posted by mganeshs <mg...@live.in>.
Solr Experts, any easy way for reading other solr docs ( other docs ) from
solr custom function ? 



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Fetch related documents from Custom Function

Posted by mganeshs <mg...@live.in>.
Yes. But being inside solr ( I mean code getting executing via Custom
function ), do we have option to read the other solr documents in a easy
way.



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Fetch related documents from Custom Function

Posted by Mikhail Khludnev <mk...@apache.org>.
Hello,
It sounds either like classic denormalization or (little bit slow and
cumbersome) result transformer [subquery].

On Mon, May 18, 2020 at 4:04 PM mganeshs <mg...@live.in> wrote:

> Is there a easy possibility of reading the few field from related documents
> from Custom function ?
>
> For ex, Project document contains, project id, project name, Project
> manager
> id  ( which is nothing but employee id ). & Employee document contains
> field
> ( Employee id, Employee name ). Now while querying the Project documents,
> in
> a custom function want to pass project manager id, and would like to read
> employee document of that Project manager and return employee name of that
> project manager.
>
> WE can do Join, but for various reason, for me Join won't work. So would
> like to read the employee document from the custom function. As Custom
> function is getting executed inside SOLR, what's the easy to read the other
> documents in SOLR, instead of establishing new connection via solrj and
> read
> it.
>
> Thanks in advance.
>
>
>
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


-- 
Sincerely yours
Mikhail Khludnev