You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jason Gerlowski (JIRA)" <ji...@apache.org> on 2019/07/15 02:01:00 UTC

[jira] [Comment Edited] (SOLR-13622) Add FileStream Streaming Expression

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

Jason Gerlowski edited comment on SOLR-13622 at 7/15/19 2:00 AM:
-----------------------------------------------------------------

I attached a quick-and-dirty POC for this.  Right now you can invoke the streaming expression as: {{fileStream(/First/absolute/path|/Second/absolute/path|...)}}

Some notes:
* Right now the filepath argument doesn't take quotes, and uses the pipe character as a delimiter between args.  Both of these are temporary things we'll want to fix, they were just a bit easier to get working in the short term.
* Currently the path argument works with absolute paths.  I did this because I was blanking on how to figure out SOLR_HOME or SOLR_DATA_HOME from SolrJ code. (The goto for this in solr-core is SolrResourceLoader, but that's not available in SolrJ where all the streaming expressions are defined.)  Maybe this isn't possible from code that lives in SolrJ...going to have to think this through a bit.  If anyone knows a trick I'm missing, or a way around the problem, please chime in.
* I haven't implemented the max-lines parameter yet, but that should be pretty straightforward.


was (Author: gerlowskija):
I attached a quick-and-dirty POC for this.  Right now you can invoke the streaming expression as: {{fileStream(/First/absolute/path|/Second/absolute/path}}

Some notes:
* Right now the filepath argument doesn't take quotes, and uses the pipe character as a delimiter between args.  Both of these are temporary things we'll want to fix, they were just a bit easier to get working in the short term.
* Currently the path argument works with absolute paths.  I did this because I was blanking on how to figure out SOLR_HOME or SOLR_DATA_HOME from SolrJ code. (The goto for this in solr-core is SolrResourceLoader, but that's not available in SolrJ where all the streaming expressions are defined.)  Maybe this isn't possible from code that lives in SolrJ...going to have to think this through a bit.  If anyone knows a trick I'm missing, or a way around the problem, please chime in.
* I haven't implemented the max-lines parameter yet, but that should be pretty straightforward.

> Add FileStream Streaming Expression
> -----------------------------------
>
>                 Key: SOLR-13622
>                 URL: https://issues.apache.org/jira/browse/SOLR-13622
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: streaming expressions
>            Reporter: Joel Bernstein
>            Assignee: Jason Gerlowski
>            Priority: Major
>         Attachments: SOLR-13622.patch
>
>
> The FileStream will read files from a local filesystem and Stream back each line of the file as a tuple.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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