Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A91D89A0D for ; Thu, 3 May 2012 22:03:10 +0000 (UTC) Received: (qmail 89108 invoked by uid 500); 3 May 2012 22:03:09 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 89031 invoked by uid 500); 3 May 2012 22:03:09 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 89022 invoked by uid 99); 3 May 2012 22:03:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2012 22:03:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2012 22:03:08 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id ED0CD42E682 for ; Thu, 3 May 2012 22:02:47 +0000 (UTC) Date: Thu, 3 May 2012 22:02:47 +0000 (UTC) From: "david babits (JIRA)" To: dev@lucene.apache.org Message-ID: <405914267.24198.1336082567972.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (SOLR-3434) CSVRequestHandler does not parse header properly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org david babits created SOLR-3434: ---------------------------------- Summary: CSVRequestHandler does not parse header properly Key: SOLR-3434 URL: https://issues.apache.org/jira/browse/SOLR-3434 Project: Solr Issue Type: Bug Affects Versions: 3.6 Environment: Linux Reporter: david babits The documentation says: header true if the first line of the CSV input contains field or column names. The default is header=true. If the fieldnames parameter is absent, these field names will be used when adding documents to the index. My command: /usr/bin/curl --proxy "" 'http://localhost:8983/solr/update/csv?commit=true&debug=true&separator=|&escape=\&trim=true&header=true&overwrite=true' --data-binary @/tmp/file_with_header.txt -H 'Content-type:text/plain; charset=utf-8' My data file (/tmp/file_with_header.txt) : |busdate |book_id |jq_idn |name_id |--------|-----------|-------------|----------- |20120420| 15600| 2070469502| 12787 |20120420| 64400| 2070469503| 12787 |20120420| 100000| 2070469501| 12787 |20120420| 60000| 2070469504| 12787 |20120420| 60000| 2070538002| 12787 |20120420| 206501| 2070538003| 12787 |20120420| 199418| 2070538004| 12787 |20120420| 7000| 2070538005| 12787 schema.xml: (tried different variations) 897 1005 jq_idn Stack trace: SEVERE: org.apache.solr.common.SolrException: Document is missing mandatory uniqueKey field: jq_idn at org.apache.solr.update.UpdateHandler.getIndexedId(UpdateHandler.java:118) at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:229) at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:61) at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:115) at org.apache.solr.handler.CSVLoader.doAdd(CSVRequestHandler.java:416) at org.apache.solr.handler.SingleThreadedCSVLoader.addDoc(CSVRequestHandler.java:431) at org.apache.solr.handler.CSVLoader.load(CSVRequestHandler.java:393) at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:58) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:244) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org