RE: CSV output
Embarassing. Yes, it was the proxy. Very old code that has now had a considerable refresh. -Original Message- From: Erik Hatcher [mailto:erik.hatc...@gmail.com] Sent: Thursday, 15 June 2017 7:13 p.m. To: solr-user@lucene.apache.org Subject: Re: CSV output Is it the proxy affecting the output?What do you get going directly to Solr's endpoint? Erik > On Jun 14, 2017, at 22:13, Phil Scadden wrote: > > If I try > /getsolr? > fl=id,title,datasource,score&hl=true&hl.maxAnalyzedChars=9000&hl.method=unified&q=Wainui-1&q.op=AND&wt=csv > > The response I get is: > id,title,datasource,scoreW:\PR_Reports\OCR\PR869.pdf,,Petroleum > Reports,8.233313W:\PR_Reports\OCR\PR3440.pdf,,Petroleum > Reports,8.217836W:\PR_Reports\OCR\PR4313.pdf,,Petroleum > Reports,8.206703W:\PR_Reports\OCR\PR3906.pdf,,Petroleum > Reports,8.185147W:\PR_Reports\OCR\PR1592.pdf,,Petroleum > Reports,8.167614W:\PR_Reports\OCR\PR998.pdf,,Petroleum > Reports,8.161142W:\PR_Reports\OCR\PR2457.pdf,,Petroleum > Reports,8.155497W:\PR_Reports\OCR\PR2433.pdf,,Petroleum > Reports,8.152924W:\PR_Reports\OCR\PR1184.pdf,,Petroleum > Reports,8.124402W:\PR_Reports\OCR\PR3551.pdf,,Petroleum Reports,8.124402 > > ie no newline separators at all (Solr 6.5.1) (/getsolr is api that proxy to > the solr server). > Changing it to > /getsolr?csv.newline=%0A&fl=id,title,datasource,score&hl=true&hl.maxAnalyzedChars=9000&hl.method=unified&q=Wainui-1&q.op=AND&wt=csv > > Makes no difference. What I am doing wrong here? Is there another way to > specify csv parameters? It says default is \n but I am not seeing that. > > Notice: This email and any attachments are confidential and may not be used, > published or redistributed without the prior written consent of the Institute > of Geological and Nuclear Sciences Limited (GNS Science). If received in > error please destroy and immediately notify GNS Science. Do not copy or > disclose the contents. Notice: This email and any attachments are confidential and may not be used, published or redistributed without the prior written consent of the Institute of Geological and Nuclear Sciences Limited (GNS Science). If received in error please destroy and immediately notify GNS Science. Do not copy or disclose the contents.
Re: CSV output
Is it the proxy affecting the output?What do you get going directly to Solr's endpoint? Erik > On Jun 14, 2017, at 22:13, Phil Scadden wrote: > > If I try > /getsolr? > fl=id,title,datasource,score&hl=true&hl.maxAnalyzedChars=9000&hl.method=unified&q=Wainui-1&q.op=AND&wt=csv > > The response I get is: > id,title,datasource,scoreW:\PR_Reports\OCR\PR869.pdf,,Petroleum > Reports,8.233313W:\PR_Reports\OCR\PR3440.pdf,,Petroleum > Reports,8.217836W:\PR_Reports\OCR\PR4313.pdf,,Petroleum > Reports,8.206703W:\PR_Reports\OCR\PR3906.pdf,,Petroleum > Reports,8.185147W:\PR_Reports\OCR\PR1592.pdf,,Petroleum > Reports,8.167614W:\PR_Reports\OCR\PR998.pdf,,Petroleum > Reports,8.161142W:\PR_Reports\OCR\PR2457.pdf,,Petroleum > Reports,8.155497W:\PR_Reports\OCR\PR2433.pdf,,Petroleum > Reports,8.152924W:\PR_Reports\OCR\PR1184.pdf,,Petroleum > Reports,8.124402W:\PR_Reports\OCR\PR3551.pdf,,Petroleum Reports,8.124402 > > ie no newline separators at all (Solr 6.5.1) (/getsolr is api that proxy to > the solr server). > Changing it to > /getsolr?csv.newline=%0A&fl=id,title,datasource,score&hl=true&hl.maxAnalyzedChars=9000&hl.method=unified&q=Wainui-1&q.op=AND&wt=csv > > Makes no difference. What I am doing wrong here? Is there another way to > specify csv parameters? It says default is \n but I am not seeing that. > > Notice: This email and any attachments are confidential and may not be used, > published or redistributed without the prior written consent of the Institute > of Geological and Nuclear Sciences Limited (GNS Science). If received in > error please destroy and immediately notify GNS Science. Do not copy or > disclose the contents.
Re: CSV output
When I was asked for something similar I quickly cobbled together a stylesheet (I'm no xsl expert so it's probably pretty bad). Invoked like this: http://localhost:8982/solr/select?q=testing&fl=id,title_t,score&&wt=xslt&tr=csv.xsl&rows=10 YMMV, but feel free to use it if it helps, I've attached it. Brendan On Jun 11, 2008, at 1:05 PM, Walter Underwood wrote: I recommend using the OpenCSV package. Works fine, Apache 2.0 license. http://opencsv.sourceforge.net/ wunder On 6/11/08 10:00 AM, "Otis Gospodnetic" <[EMAIL PROTECTED]> wrote: Hi Marshall, I don't think there is a CSV Writer, but here are some pointers for writing one: $ ff \*Writer\*java | grep -v Test | grep request ./src/java/org/apache/solr/request/PHPResponseWriter.java ./src/java/org/apache/solr/request/XSLTResponseWriter.java ./src/java/org/apache/solr/request/JSONResponseWriter.java ./src/java/org/apache/solr/request/PythonResponseWriter.java ./src/java/org/apache/solr/request/RawResponseWriter.java ./src/java/org/apache/solr/request/QueryResponseWriter.java ./src/java/org/apache/solr/request/PHPSerializedResponseWriter.java ./src/java/org/apache/solr/request/BinaryResponseWriter.java ./src/java/org/apache/solr/request/RubyResponseWriter.java ./src/java/org/apache/solr/request/TextResponseWriter.java ./src/java/org/apache/solr/request/XMLWriter.java ./src/java/org/apache/solr/request/BinaryQueryResponseWriter.java ./src/java/org/apache/solr/request/XMLResponseWriter.java Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message From: Marshall Weir <[EMAIL PROTECTED]> To: solr-user@lucene.apache.org Sent: Wednesday, June 11, 2008 12:52:50 PM Subject: CSV output Hi, Does SOLR have .csv output? I can find references to .csv input, but not output. Thank you, Marshall
Re: CSV output
I recommend using the OpenCSV package. Works fine, Apache 2.0 license. http://opencsv.sourceforge.net/ wunder On 6/11/08 10:00 AM, "Otis Gospodnetic" <[EMAIL PROTECTED]> wrote: > Hi Marshall, > > I don't think there is a CSV Writer, but here are some pointers for writing > one: > > $ ff \*Writer\*java | grep -v Test | grep request > ./src/java/org/apache/solr/request/PHPResponseWriter.java > ./src/java/org/apache/solr/request/XSLTResponseWriter.java > ./src/java/org/apache/solr/request/JSONResponseWriter.java > ./src/java/org/apache/solr/request/PythonResponseWriter.java > ./src/java/org/apache/solr/request/RawResponseWriter.java > ./src/java/org/apache/solr/request/QueryResponseWriter.java > ./src/java/org/apache/solr/request/PHPSerializedResponseWriter.java > ./src/java/org/apache/solr/request/BinaryResponseWriter.java > ./src/java/org/apache/solr/request/RubyResponseWriter.java > ./src/java/org/apache/solr/request/TextResponseWriter.java > ./src/java/org/apache/solr/request/XMLWriter.java > ./src/java/org/apache/solr/request/BinaryQueryResponseWriter.java > ./src/java/org/apache/solr/request/XMLResponseWriter.java > > Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > - Original Message >> From: Marshall Weir <[EMAIL PROTECTED]> >> To: solr-user@lucene.apache.org >> Sent: Wednesday, June 11, 2008 12:52:50 PM >> Subject: CSV output >> >> Hi, >> >> Does SOLR have .csv output? I can find references to .csv input, but >> not output. >> >> Thank you, >> Marshall >
Re: CSV output
Hi Marshall, I don't think there is a CSV Writer, but here are some pointers for writing one: $ ff \*Writer\*java | grep -v Test | grep request ./src/java/org/apache/solr/request/PHPResponseWriter.java ./src/java/org/apache/solr/request/XSLTResponseWriter.java ./src/java/org/apache/solr/request/JSONResponseWriter.java ./src/java/org/apache/solr/request/PythonResponseWriter.java ./src/java/org/apache/solr/request/RawResponseWriter.java ./src/java/org/apache/solr/request/QueryResponseWriter.java ./src/java/org/apache/solr/request/PHPSerializedResponseWriter.java ./src/java/org/apache/solr/request/BinaryResponseWriter.java ./src/java/org/apache/solr/request/RubyResponseWriter.java ./src/java/org/apache/solr/request/TextResponseWriter.java ./src/java/org/apache/solr/request/XMLWriter.java ./src/java/org/apache/solr/request/BinaryQueryResponseWriter.java ./src/java/org/apache/solr/request/XMLResponseWriter.java Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message > From: Marshall Weir <[EMAIL PROTECTED]> > To: solr-user@lucene.apache.org > Sent: Wednesday, June 11, 2008 12:52:50 PM > Subject: CSV output > > Hi, > > Does SOLR have .csv output? I can find references to .csv input, but > not output. > > Thank you, > Marshall