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

2019-08-04 Thread Joel Bernstein (JIRA)


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

Joel Bernstein edited comment on SOLR-13622 at 8/4/19 4:46 PM:
---

This function works great! As I've been testing it out I've found the "files" 
function name to be a bit confusing. I was thinking that a better name might be 
"cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design.  


was (Author: joel.bernstein):
This function works great! As I've been testing it out I've found the "files" 
function name to be a bit confusing (I had originally requested the name 
"files"). I was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design.  

> Add FileStream Streaming Expression
> ---
>
> Key: SOLR-13622
> URL: https://issues.apache.org/jira/browse/SOLR-13622
> Project: Solr
>  Issue Type: New Feature
>  Components: streaming expressions
>Reporter: Joel Bernstein
>Assignee: Jason Gerlowski
>Priority: Major
> Fix For: 8.3
>
> Attachments: SOLR-13622.patch, 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2019-08-04 Thread Joel Bernstein (JIRA)


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

Joel Bernstein edited comment on SOLR-13622 at 8/4/19 4:30 PM:
---

This function works great! As I've been testing it out I've found the "files" 
function name to be a bit confusing (I had originally requested the name 
"files"). I was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design.  


was (Author: joel.bernstein):
This function work great! As I've been testing it out I've found the "files" 
function name to be a bit confusing (I had originally requested the name 
"files"). I was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design.  

> Add FileStream Streaming Expression
> ---
>
> Key: SOLR-13622
> URL: https://issues.apache.org/jira/browse/SOLR-13622
> Project: Solr
>  Issue Type: New Feature
>  Components: streaming expressions
>Reporter: Joel Bernstein
>Assignee: Jason Gerlowski
>Priority: Major
> Fix For: 8.3
>
> Attachments: SOLR-13622.patch, 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2019-08-04 Thread Joel Bernstein (JIRA)


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

Joel Bernstein edited comment on SOLR-13622 at 8/4/19 4:29 PM:
---

This function work great! As I've been testing it out I've found the "files" 
function name to be a bit confusing (I had originally requested the name 
"files"). I was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design.  


was (Author: joel.bernstein):
This function work great! As I've been testing it out I've found the "files" 
function name to be a bit confusing (I had originally requested that name). I 
was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design.  

> Add FileStream Streaming Expression
> ---
>
> Key: SOLR-13622
> URL: https://issues.apache.org/jira/browse/SOLR-13622
> Project: Solr
>  Issue Type: New Feature
>  Components: streaming expressions
>Reporter: Joel Bernstein
>Assignee: Jason Gerlowski
>Priority: Major
> Fix For: 8.3
>
> Attachments: SOLR-13622.patch, 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2019-08-04 Thread Joel Bernstein (JIRA)


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

Joel Bernstein edited comment on SOLR-13622 at 8/4/19 4:29 PM:
---

This functions work great! As I've been testing it out I've found the "files" 
function name to be a bit confusing (I had originally requested that name). I 
was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design.  


was (Author: joel.bernstein):
The more that I test out this feature the less I like the function name 
"files". I was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design.  

> Add FileStream Streaming Expression
> ---
>
> Key: SOLR-13622
> URL: https://issues.apache.org/jira/browse/SOLR-13622
> Project: Solr
>  Issue Type: New Feature
>  Components: streaming expressions
>Reporter: Joel Bernstein
>Assignee: Jason Gerlowski
>Priority: Major
> Fix For: 8.3
>
> Attachments: SOLR-13622.patch, 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2019-08-04 Thread Joel Bernstein (JIRA)


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

Joel Bernstein edited comment on SOLR-13622 at 8/4/19 4:29 PM:
---

This function work great! As I've been testing it out I've found the "files" 
function name to be a bit confusing (I had originally requested that name). I 
was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design.  


was (Author: joel.bernstein):
This functions work great! As I've been testing it out I've found the "files" 
function name to be a bit confusing (I had originally requested that name). I 
was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design.  

> Add FileStream Streaming Expression
> ---
>
> Key: SOLR-13622
> URL: https://issues.apache.org/jira/browse/SOLR-13622
> Project: Solr
>  Issue Type: New Feature
>  Components: streaming expressions
>Reporter: Joel Bernstein
>Assignee: Jason Gerlowski
>Priority: Major
> Fix For: 8.3
>
> Attachments: SOLR-13622.patch, 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2019-08-04 Thread Joel Bernstein (JIRA)


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

Joel Bernstein edited comment on SOLR-13622 at 8/4/19 4:17 PM:
---

The more that I test out this feature the less I like the function name 
"files". I was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design.  


was (Author: joel.bernstein):
The more that I test out this feature the less I like the function name 
"files". I was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design. 

 

 

> Add FileStream Streaming Expression
> ---
>
> Key: SOLR-13622
> URL: https://issues.apache.org/jira/browse/SOLR-13622
> Project: Solr
>  Issue Type: New Feature
>  Components: streaming expressions
>Reporter: Joel Bernstein
>Assignee: Jason Gerlowski
>Priority: Major
> Fix For: 8.3
>
> Attachments: SOLR-13622.patch, 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2019-08-04 Thread Joel Bernstein (JIRA)


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

Joel Bernstein edited comment on SOLR-13622 at 8/4/19 4:16 PM:
---

The more that I test out this feature the less I like the function name 
"files". I was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}
We can keep the undelying FileStream class and just map a different function 
name.

The reason I like "cat" is that it behaves very much like the unix cat command 
and the Streaming Expression design is very similar to the unix pipes design. 

 

 


was (Author: joel.bernstein):
The more that I test out this feature the less I like the function name 
"files". I was thinking that a better name might be "cat".

The sample syntax would be:
{code:java}
cat("file.csv"){code}

> Add FileStream Streaming Expression
> ---
>
> Key: SOLR-13622
> URL: https://issues.apache.org/jira/browse/SOLR-13622
> Project: Solr
>  Issue Type: New Feature
>  Components: streaming expressions
>Reporter: Joel Bernstein
>Assignee: Jason Gerlowski
>Priority: Major
> Fix For: 8.3
>
> Attachments: SOLR-13622.patch, 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2019-07-15 Thread Joel Bernstein (JIRA)


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

Joel Bernstein edited comment on SOLR-13622 at 7/15/19 12:42 PM:
-

The StreamContext has a reference to the SolrCore where the request is being 
executed. 
{code:java}
SolrCore core = (SolrCore)streamContext.get("solr-core"){code}
Once you have the core you can get the SolrResourceLoader and then figure out 
how to fetch files.

The SolrCore is set for each request in StreamHandler line 174.


was (Author: joel.bernstein):
The StreamContext has a reference to the SolrCore where the request is being 
executed. 
{code:java}
SolrCore core = streamContext.get("solr-core"){code}
Once you have the core you can get the SolrResourceLoader and then figure out 
how to fetch files.

The SolrCore is set for each request in StreamHandler line 174.

> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2019-07-14 Thread Jason Gerlowski (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org