[ 
https://issues.apache.org/jira/browse/SOLR-9337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15513940#comment-15513940
 ] 

Joel Bernstein commented on SOLR-9337:
--------------------------------------

fetch works like this:

1) read N tuples into memory
2) Use a query to fetch fields for the tuples read in step 1.
3) stream the tuples out
4) repeat steps 1-3 until the underlying stream is EOF

This is essentially a nested loop join agains the index.

Mainly used when one side of the join is very small and you want to join it 
against the entire index. 

One main use case I have in mind is doing a graph query, fetching text fields 
for node set that is returned, and then running the classifier on the node set. 
This would combine graph queries and AI models to provide very intelligent 
recommendations.








> Add fetch Streaming Expression
> ------------------------------
>
>                 Key: SOLR-9337
>                 URL: https://issues.apache.org/jira/browse/SOLR-9337
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Joel Bernstein
>
> The fetch() Streaming Expression wraps another expression and fetches 
> additional fields for documents in batches. The fetch() expression will 
> stream out the Tuples after the data has been fetched. Fields can be fetched 
> from any SolrCloud collection. 
> Sample syntax:
> {code}
> daemon(
>        update(collectionC, batchSize="100"
>               fetch(collectionB, 
>                     topic(checkpoints, collectionA, q="*:*", fl="a,b,c", 
> rows="50"),
>                     fl="j,m,z",
>                     on="a=j")))
>        
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to