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 Ronald Wood <rw...@smarsh.com> on 2016/06/02 00:15:39 UTC
Solr /export and dates (Solr 5.5.1)
I have spent a bit of time with the export handler in 5.5.1 (since we are unable to upgrade directly from 4 to 6). The speed looks impressive at first glance compared to paging with cursors.
However, I am deeply confused that it does not seem to be possible to either sort on or get date values when doing an export.
I say deeply confused, because the example in the Reference Guide is this:
http://localhost:8983/solr/core_name/export?q=my-query&sort=severity+desc,timestamp+desc&fl=severity,timestamp,msg
Now, I suppose you could argue that timestamp’s schema type isn’t shown, so maybe it’s an epochal integer value.
Certainly when I try to get our date field (defined as TrieDateField in our schema) I get this error:
java.io.IOException: Export fields must either be one of the following types: int,float,long,double,string
at org.apache.solr.response.SortingResponseWriter.getFieldWriters(SortingResponseWriter.java:277)
at org.apache.solr.response.SortingResponseWriter.write(SortingResponseWriter.java:120)
at org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:52)
...
And I see date is not a type there. However, int, float, long and double are also Trie types, so I’m not sure why a TrieDateField could not also be sorted or exported.
I wonder if someone could elucidate this. I would have thought getting dates out of an export or stream would be highly desirable. I am definitely open to the high likelihood I am doing something wrong.
I apologize if this topic has been covered before, as I was unable to find a way to search the mailing list on the Apache mail archives site. I wonder if there’s some search engine out there that could do that kind of thing? 😉
Ronald S. Wood | Senior Software Developer
857-991-7681 (mobile)
Smarsh
100 Franklin St. Suite 903 | Boston, MA 02210
1-866-SMARSH-1 | 971-998-9967 (fax)
www.smarsh.com<http://www.smarsh.com/>
Immediate customer support:
Call 1-866-762-7741 (x2) or visit www.smarsh.com/support<http://www.smarsh.com/support>
Re: Solr /export and dates (Solr 5.5.1)
Posted by Erick Erickson <er...@gmail.com>.
Sorry, it dropped off my radar somehow. Just opened SOLR-9187. I have
a patch that I'm testing now, we'll see how that goes.
On Wed, Jun 1, 2016 at 7:54 PM, Ronald Wood <rw...@smarsh.com> wrote:
>
> Thanks! I'm glad to find out I'm not going crazy.
>
> I'll keep a lookout for that enhancement.
>
> Ronald S. Wood
>
> Immediate customer support:
> Call 1-866-762-7741<tel:1-866-762-7741> (x2) or emailsupport@smarsh.com<ma...@smarsh.com>
>
> On Jun 1, 2016, at 21:45, Joel Bernstein <jo...@gmail.com>> wrote:
>
> The documentation is wrong for sure. We need a new example query.
>
> I was just discussing the date issue with Erick Erickson the other day. I
> believe he is working on adding dates to the export handler but I didn't
> see a jira ticket for this yet. We'll also need to add dates to the /export
> handler for date support in the Parallel SQL interface.
>
> Erick, if you're reading this, let us know if this is in the works.
>
>
>
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Wed, Jun 1, 2016 at 8:15 PM, Ronald Wood <rw...@smarsh.com>> wrote:
>
> I have spent a bit of time with the export handler in 5.5.1 (since we are
> unable to upgrade directly from 4 to 6). The speed looks impressive at
> first glance compared to paging with cursors.
>
> However, I am deeply confused that it does not seem to be possible to
> either sort on or get date values when doing an export.
>
> I say deeply confused, because the example in the Reference Guide is this:
>
>
> http://localhost:8983/solr/core_name/export?q=my-query&sort=severity+desc,timestamp+desc&fl=severity,timestamp,msg
>
> Now, I suppose you could argue that timestamp's schema type isn't shown,
> so maybe it's an epochal integer value.
>
> Certainly when I try to get our date field (defined as TrieDateField in
> our schema) I get this error:
>
> java.io.IOException: Export fields must either be one of the following
> types: int,float,long,double,string
> at
> org.apache.solr.response.SortingResponseWriter.getFieldWriters(SortingResponseWriter.java:277)
> at
> org.apache.solr.response.SortingResponseWriter.write(SortingResponseWriter.java:120)
> at
> org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:52)
> ...
>
> And I see date is not a type there. However, int, float, long and double
> are also Trie types, so I'm not sure why a TrieDateField could not also be
> sorted or exported.
>
> I wonder if someone could elucidate this. I would have thought getting
> dates out of an export or stream would be highly desirable. I am definitely
> open to the high likelihood I am doing something wrong.
>
> I apologize if this topic has been covered before, as I was unable to find
> a way to search the mailing list on the Apache mail archives site. I wonder
> if there's some search engine out there that could do that kind of thing? ?
>
> Ronald S. Wood | Senior Software Developer
> 857-991-7681 (mobile)
>
> Smarsh
> 100 Franklin St. Suite 903 | Boston, MA 02210
> 1-866-SMARSH-1 | 971-998-9967 (fax)
> www.smarsh.com<http://www.smarsh.com><http://www.smarsh.com/>
>
> Immediate customer support:
> Call 1-866-762-7741 (x2) or visit www.smarsh.com/support<http://www.smarsh.com/support><
> http://www.smarsh.com/support>
>
Re: Solr /export and dates (Solr 5.5.1)
Posted by Ronald Wood <rw...@smarsh.com>.
Thanks! I'm glad to find out I'm not going crazy.
I'll keep a lookout for that enhancement.
Ronald S. Wood
Immediate customer support:
Call 1-866-762-7741<tel:1-866-762-7741> (x2) or emailsupport@smarsh.com<ma...@smarsh.com>
On Jun 1, 2016, at 21:45, Joel Bernstein <jo...@gmail.com>> wrote:
The documentation is wrong for sure. We need a new example query.
I was just discussing the date issue with Erick Erickson the other day. I
believe he is working on adding dates to the export handler but I didn't
see a jira ticket for this yet. We'll also need to add dates to the /export
handler for date support in the Parallel SQL interface.
Erick, if you're reading this, let us know if this is in the works.
Joel Bernstein
http://joelsolr.blogspot.com/
On Wed, Jun 1, 2016 at 8:15 PM, Ronald Wood <rw...@smarsh.com>> wrote:
I have spent a bit of time with the export handler in 5.5.1 (since we are
unable to upgrade directly from 4 to 6). The speed looks impressive at
first glance compared to paging with cursors.
However, I am deeply confused that it does not seem to be possible to
either sort on or get date values when doing an export.
I say deeply confused, because the example in the Reference Guide is this:
http://localhost:8983/solr/core_name/export?q=my-query&sort=severity+desc,timestamp+desc&fl=severity,timestamp,msg
Now, I suppose you could argue that timestamp's schema type isn't shown,
so maybe it's an epochal integer value.
Certainly when I try to get our date field (defined as TrieDateField in
our schema) I get this error:
java.io.IOException: Export fields must either be one of the following
types: int,float,long,double,string
at
org.apache.solr.response.SortingResponseWriter.getFieldWriters(SortingResponseWriter.java:277)
at
org.apache.solr.response.SortingResponseWriter.write(SortingResponseWriter.java:120)
at
org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:52)
...
And I see date is not a type there. However, int, float, long and double
are also Trie types, so I'm not sure why a TrieDateField could not also be
sorted or exported.
I wonder if someone could elucidate this. I would have thought getting
dates out of an export or stream would be highly desirable. I am definitely
open to the high likelihood I am doing something wrong.
I apologize if this topic has been covered before, as I was unable to find
a way to search the mailing list on the Apache mail archives site. I wonder
if there's some search engine out there that could do that kind of thing? ?
Ronald S. Wood | Senior Software Developer
857-991-7681 (mobile)
Smarsh
100 Franklin St. Suite 903 | Boston, MA 02210
1-866-SMARSH-1 | 971-998-9967 (fax)
www.smarsh.com<http://www.smarsh.com><http://www.smarsh.com/>
Immediate customer support:
Call 1-866-762-7741 (x2) or visit www.smarsh.com/support<http://www.smarsh.com/support><
http://www.smarsh.com/support>
Re: Solr /export and dates (Solr 5.5.1)
Posted by Joel Bernstein <jo...@gmail.com>.
The documentation is wrong for sure. We need a new example query.
I was just discussing the date issue with Erick Erickson the other day. I
believe he is working on adding dates to the export handler but I didn't
see a jira ticket for this yet. We'll also need to add dates to the /export
handler for date support in the Parallel SQL interface.
Erick, if you're reading this, let us know if this is in the works.
Joel Bernstein
http://joelsolr.blogspot.com/
On Wed, Jun 1, 2016 at 8:15 PM, Ronald Wood <rw...@smarsh.com> wrote:
> I have spent a bit of time with the export handler in 5.5.1 (since we are
> unable to upgrade directly from 4 to 6). The speed looks impressive at
> first glance compared to paging with cursors.
>
> However, I am deeply confused that it does not seem to be possible to
> either sort on or get date values when doing an export.
>
> I say deeply confused, because the example in the Reference Guide is this:
>
>
> http://localhost:8983/solr/core_name/export?q=my-query&sort=severity+desc,timestamp+desc&fl=severity,timestamp,msg
>
> Now, I suppose you could argue that timestamp’s schema type isn’t shown,
> so maybe it’s an epochal integer value.
>
> Certainly when I try to get our date field (defined as TrieDateField in
> our schema) I get this error:
>
> java.io.IOException: Export fields must either be one of the following
> types: int,float,long,double,string
> at
> org.apache.solr.response.SortingResponseWriter.getFieldWriters(SortingResponseWriter.java:277)
> at
> org.apache.solr.response.SortingResponseWriter.write(SortingResponseWriter.java:120)
> at
> org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:52)
> ...
>
> And I see date is not a type there. However, int, float, long and double
> are also Trie types, so I’m not sure why a TrieDateField could not also be
> sorted or exported.
>
> I wonder if someone could elucidate this. I would have thought getting
> dates out of an export or stream would be highly desirable. I am definitely
> open to the high likelihood I am doing something wrong.
>
> I apologize if this topic has been covered before, as I was unable to find
> a way to search the mailing list on the Apache mail archives site. I wonder
> if there’s some search engine out there that could do that kind of thing? 😉
>
> Ronald S. Wood | Senior Software Developer
> 857-991-7681 (mobile)
>
> Smarsh
> 100 Franklin St. Suite 903 | Boston, MA 02210
> 1-866-SMARSH-1 | 971-998-9967 (fax)
> www.smarsh.com<http://www.smarsh.com/>
>
> Immediate customer support:
> Call 1-866-762-7741 (x2) or visit www.smarsh.com/support<
> http://www.smarsh.com/support>
>