From 731416af36cec7250cd3a19522de1da664c2c5b2 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Fri, 30 Mar 2007 16:59:58 +0000 Subject: [PATCH] CSV updates: SOLR-66 git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@524175 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 + example/exampledocs/books.csv | 11 + example/solr/conf/solrconfig.xml | 5 + lib/commons-csv-0.1-SNAPSHOT.jar | 2 + .../solr/handler/CSVRequestHandler.java | 386 ++++++++++++++++++ .../org/apache/solr/request/SolrParams.java | 8 + .../org/apache/solr/util/TestHarness.java | 19 +- .../apache/solr/handler/TestCSVLoader.java | 239 +++++++++++ src/test/test-files/solr/conf/solrconfig.xml | 4 +- 9 files changed, 672 insertions(+), 4 deletions(-) create mode 100755 example/exampledocs/books.csv create mode 100755 lib/commons-csv-0.1-SNAPSHOT.jar create mode 100755 src/java/org/apache/solr/handler/CSVRequestHandler.java create mode 100755 src/test/org/apache/solr/handler/TestCSVLoader.java diff --git a/CHANGES.txt b/CHANGES.txt index ec43261a216..eee42c69f5a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -135,6 +135,8 @@ New Features 19. SOLR-197: New parameters for input: stream.contentType for specifying or overriding the content type of input, and stream.file for reading local files. (Ryan McKinley via yonik) + +20. SOLR-66: CSV data format for document additions and updates. (yonik) Changes in runtime behavior 1. Highlighting using DisMax will only pick up terms from the main diff --git a/example/exampledocs/books.csv b/example/exampledocs/books.csv new file mode 100755 index 00000000000..36b20f515c1 --- /dev/null +++ b/example/exampledocs/books.csv @@ -0,0 +1,11 @@ +id,cat,name,price,inStock,author_t,series_t,sequence_i,genre_s +0553573403,book,A Game of Thrones,7.99,true,George R.R. Martin,"A Song of Ice and Fire",1,fantasy +0553579908,book,A Clash of Kings,7.99,true,George R.R. Martin,"A Song of Ice and Fire",2,fantasy +055357342X,book,A Storm of Swords,7.99,true,George R.R. Martin,"A Song of Ice and Fire",3,fantasy +0553293354,book,Foundation,7.99,true,Isaac Asimov,Foundation Novels,1,scifi +0812521390,book,The Black Company,6.99,false,Glen Cook,The Chronicles of The Black Company,1,fantasy +0812550706,book,Ender's Game,6.99,true,Orson Scott Card,Ender,1,scifi +0441385532,book,Jhereg,7.95,false,Steven Brust,Vlad Taltos,1,fantasy +0380014300,book,Nine Princes In Amber,6.99,true,Roger Zelazny,the Chronicles of Amber,1,fantasy +0805080481,book,The Book of Three,5.99,true,Lloyd Alexander,The Chronicles of Prydain,1,fantasy +080508049X,book,The Black Cauldron,5.99,true,Lloyd Alexander,The Chronicles of Prydain,2,fantasy diff --git a/example/solr/conf/solrconfig.xml b/example/solr/conf/solrconfig.xml index 7d2808f91a1..6b8aa9d2e8b 100755 --- a/example/solr/conf/solrconfig.xml +++ b/example/solr/conf/solrconfig.xml @@ -384,6 +384,11 @@ + + + + + @@ -275,5 +278,4 @@ prefix-${solr.test.sys.prop2}-suffix -