From 755463eed74ed7de9a3c1a12495d2dad655d31d5 Mon Sep 17 00:00:00 2001 From: Alvin Li Date: Tue, 13 Aug 2013 14:42:32 +0800 Subject: added 'isuifang_solr' --- isuifang_solr/exampledocs/books.csv | 11 ++++ isuifang_solr/exampledocs/books.json | 51 ++++++++++++++++ isuifang_solr/exampledocs/gb18030-example.xml | 32 ++++++++++ isuifang_solr/exampledocs/hd.xml | 52 ++++++++++++++++ isuifang_solr/exampledocs/ipod_other.xml | 56 +++++++++++++++++ isuifang_solr/exampledocs/ipod_video.xml | 38 ++++++++++++ isuifang_solr/exampledocs/mem.xml | 71 ++++++++++++++++++++++ isuifang_solr/exampledocs/money.xml | 65 ++++++++++++++++++++ isuifang_solr/exampledocs/monitor.xml | 33 ++++++++++ isuifang_solr/exampledocs/monitor2.xml | 32 ++++++++++ isuifang_solr/exampledocs/mp500.xml | 41 +++++++++++++ isuifang_solr/exampledocs/post.jar | Bin 0 -> 6091 bytes isuifang_solr/exampledocs/post.sh | 28 +++++++++ isuifang_solr/exampledocs/sd500.xml | 36 +++++++++++ isuifang_solr/exampledocs/solr.xml | 38 ++++++++++++ isuifang_solr/exampledocs/test_utf8.sh | 83 ++++++++++++++++++++++++++ isuifang_solr/exampledocs/utf8-example.xml | 42 +++++++++++++ isuifang_solr/exampledocs/vidcard.xml | 57 ++++++++++++++++++ 18 files changed, 766 insertions(+) create mode 100644 isuifang_solr/exampledocs/books.csv create mode 100644 isuifang_solr/exampledocs/books.json create mode 100644 isuifang_solr/exampledocs/gb18030-example.xml create mode 100644 isuifang_solr/exampledocs/hd.xml create mode 100644 isuifang_solr/exampledocs/ipod_other.xml create mode 100644 isuifang_solr/exampledocs/ipod_video.xml create mode 100644 isuifang_solr/exampledocs/mem.xml create mode 100644 isuifang_solr/exampledocs/money.xml create mode 100644 isuifang_solr/exampledocs/monitor.xml create mode 100644 isuifang_solr/exampledocs/monitor2.xml create mode 100644 isuifang_solr/exampledocs/mp500.xml create mode 100644 isuifang_solr/exampledocs/post.jar create mode 100644 isuifang_solr/exampledocs/post.sh create mode 100644 isuifang_solr/exampledocs/sd500.xml create mode 100644 isuifang_solr/exampledocs/solr.xml create mode 100644 isuifang_solr/exampledocs/test_utf8.sh create mode 100644 isuifang_solr/exampledocs/utf8-example.xml create mode 100644 isuifang_solr/exampledocs/vidcard.xml (limited to 'isuifang_solr/exampledocs') diff --git a/isuifang_solr/exampledocs/books.csv b/isuifang_solr/exampledocs/books.csv new file mode 100644 index 0000000..36b20f5 --- /dev/null +++ b/isuifang_solr/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/isuifang_solr/exampledocs/books.json b/isuifang_solr/exampledocs/books.json new file mode 100644 index 0000000..f82d510 --- /dev/null +++ b/isuifang_solr/exampledocs/books.json @@ -0,0 +1,51 @@ +[ + { + "id" : "978-0641723445", + "cat" : ["book","hardcover"], + "name" : "The Lightning Thief", + "author" : "Rick Riordan", + "series_t" : "Percy Jackson and the Olympians", + "sequence_i" : 1, + "genre_s" : "fantasy", + "inStock" : true, + "price" : 12.50, + "pages_i" : 384 + } +, + { + "id" : "978-1423103349", + "cat" : ["book","paperback"], + "name" : "The Sea of Monsters", + "author" : "Rick Riordan", + "series_t" : "Percy Jackson and the Olympians", + "sequence_i" : 2, + "genre_s" : "fantasy", + "inStock" : true, + "price" : 6.49, + "pages_i" : 304 + } +, + { + "id" : "978-1857995879", + "cat" : ["book","paperback"], + "name" : "Sophie's World : The Greek Philosophers", + "author" : "Jostein Gaarder", + "sequence_i" : 1, + "genre_s" : "fantasy", + "inStock" : true, + "price" : 3.07, + "pages_i" : 64 + } +, + { + "id" : "978-1933988177", + "cat" : ["book","paperback"], + "name" : "Lucene in Action, Second Edition", + "author" : "Michael McCandless", + "sequence_i" : 1, + "genre_s" : "IT", + "inStock" : true, + "price" : 30.50, + "pages_i" : 475 + } +] diff --git a/isuifang_solr/exampledocs/gb18030-example.xml b/isuifang_solr/exampledocs/gb18030-example.xml new file mode 100644 index 0000000..769be19 --- /dev/null +++ b/isuifang_solr/exampledocs/gb18030-example.xml @@ -0,0 +1,32 @@ + + + + + + GB18030TEST + Test with some GB18030 encoded characters + No accents here + 这是一个功能 + This is a feature (translated) + 这份文件是很有光泽 + This document is very shiny (translated) + 0 + true + + + diff --git a/isuifang_solr/exampledocs/hd.xml b/isuifang_solr/exampledocs/hd.xml new file mode 100644 index 0000000..7555100 --- /dev/null +++ b/isuifang_solr/exampledocs/hd.xml @@ -0,0 +1,52 @@ + + + + + SP2514N + Samsung SpinPoint P120 SP2514N - hard drive - 250 GB - ATA-133 + Samsung Electronics Co. Ltd. + electronics + hard drive + 7200RPM, 8MB cache, IDE Ultra ATA-133 + NoiseGuard, SilentSeek technology, Fluid Dynamic Bearing (FDB) motor + 92 + 6 + true + 2006-02-13T15:26:37Z + + 35.0752,-97.032 + + + + 6H500F0 + Maxtor DiamondMax 11 - hard drive - 500 GB - SATA-300 + Maxtor Corp. + electronics + hard drive + SATA 3.0Gb/s, NCQ + 8.5ms seek + 16MB cache + 350 + 6 + true + + 45.17614,-93.87341 + 2006-02-13T15:26:37Z + + + diff --git a/isuifang_solr/exampledocs/ipod_other.xml b/isuifang_solr/exampledocs/ipod_other.xml new file mode 100644 index 0000000..8a1dd5d --- /dev/null +++ b/isuifang_solr/exampledocs/ipod_other.xml @@ -0,0 +1,56 @@ + + + + + + F8V7067-APL-KIT + Belkin Mobile Power Cord for iPod w/ Dock + Belkin + electronics + connector + car power adapter, white + 4 + 19.95 + 1 + false + + 45.17614,-93.87341 + 2005-08-01T16:30:25Z + + + + IW-02 + iPod & iPod Mini USB 2.0 Cable + Belkin + electronics + connector + car power adapter for iPod, white + 2 + 11.50 + 1 + false + + 37.7752,-122.4232 + 2006-02-14T23:55:59Z + + + + + + + diff --git a/isuifang_solr/exampledocs/ipod_video.xml b/isuifang_solr/exampledocs/ipod_video.xml new file mode 100644 index 0000000..7895860 --- /dev/null +++ b/isuifang_solr/exampledocs/ipod_video.xml @@ -0,0 +1,38 @@ + + + + MA147LL/A + Apple 60 GB iPod with Video Playback Black + Apple Computer Inc. + electronics + music + iTunes, Podcasts, Audiobooks + Stores up to 15,000 songs, 25,000 photos, or 150 hours of video + 2.5-inch, 320x240 color TFT LCD display with LED backlight + Up to 20 hours of battery life + Plays AAC, MP3, WAV, AIFF, Audible, Apple Lossless, H.264 video + Notes, Calendar, Phone book, Hold button, Date display, Photo wallet, Built-in games, JPEG photo playback, Upgradeable firmware, USB 2.0 compatibility, Playback speed control, Rechargeable capability, Battery level indication + earbud headphones, USB cable + 5.5 + 399.00 + 10 + true + + 37.7752,-100.0232 + 2005-10-12T08:00:00Z + diff --git a/isuifang_solr/exampledocs/mem.xml b/isuifang_solr/exampledocs/mem.xml new file mode 100644 index 0000000..115d664 --- /dev/null +++ b/isuifang_solr/exampledocs/mem.xml @@ -0,0 +1,71 @@ + + + + + TWINX2048-3200PRO + CORSAIR XMS 2GB (2 x 1GB) 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) Dual Channel Kit System Memory - Retail + Corsair Microsystems Inc. + electronics + memory + CAS latency 2, 2-3-3-6 timing, 2.75v, unbuffered, heat-spreader + 185 + 5 + true + + 37.7752,-122.4232 + 2006-02-13T15:26:37Z + + + electronics|6.0 memory|3.0 + + + + VS1GB400C3 + CORSAIR ValueSelect 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System Memory - Retail + Corsair Microsystems Inc. + electronics + memory + 74.99 + 7 + true + + 37.7752,-100.0232 + 2006-02-13T15:26:37Z + + electronics|4.0 memory|2.0 + + + + VDBDB1A16 + A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System Memory - OEM + A-DATA Technology Inc. + electronics + memory + CAS latency 3, 2.7v + + 0 + true + + 45.17614,-93.87341 + 2006-02-13T15:26:37Z + + electronics|0.9 memory|0.1 + + + + diff --git a/isuifang_solr/exampledocs/money.xml b/isuifang_solr/exampledocs/money.xml new file mode 100644 index 0000000..b1b8036 --- /dev/null +++ b/isuifang_solr/exampledocs/money.xml @@ -0,0 +1,65 @@ + + + + + + USD + One Dollar + Bank of America + boa + currency + Coins and notes + 1,USD + true + + + + EUR + One Euro + European Union + eu + currency + Coins and notes + 1,EUR + true + + + + GBP + One British Pound + U.K. + uk + currency + Coins and notes + 1,GBP + true + + + + NOK + One Krone + Bank of Norway + nor + currency + Coins and notes + 1,NOK + true + + + + diff --git a/isuifang_solr/exampledocs/monitor.xml b/isuifang_solr/exampledocs/monitor.xml new file mode 100644 index 0000000..035f618 --- /dev/null +++ b/isuifang_solr/exampledocs/monitor.xml @@ -0,0 +1,33 @@ + + + + 3007WFP + Dell Widescreen UltraSharp 3007WFP + Dell, Inc. + electronics + monitor + 30" TFT active matrix LCD, 2560 x 1600, .25mm dot pitch, 700:1 contrast + USB cable + 401.6 + 2199 + 6 + true + + 43.17614,-90.57341 + + diff --git a/isuifang_solr/exampledocs/monitor2.xml b/isuifang_solr/exampledocs/monitor2.xml new file mode 100644 index 0000000..64e33a4 --- /dev/null +++ b/isuifang_solr/exampledocs/monitor2.xml @@ -0,0 +1,32 @@ + + + + VA902B + ViewSonic VA902B - flat panel display - TFT - 19" + ViewSonic Corp. + electronics + monitor + 19" TFT active matrix LCD, 8ms response time, 1280 x 1024 native resolution + 190.4 + 279.95 + 6 + true + + 45.17614,-93.87341 + + diff --git a/isuifang_solr/exampledocs/mp500.xml b/isuifang_solr/exampledocs/mp500.xml new file mode 100644 index 0000000..2a91407 --- /dev/null +++ b/isuifang_solr/exampledocs/mp500.xml @@ -0,0 +1,41 @@ + + + + 0579B002 + Canon PIXMA MP500 All-In-One Photo Printer + Canon Inc. + electronics + multifunction printer + printer + scanner + copier + Multifunction ink-jet color photo printer + Flatbed scanner, optical scan resolution of 1,200 x 2,400 dpi + 2.5" color LCD preview screen + Duplex Copying + Printing speed up to 29ppm black, 19ppm color + Hi-Speed USB + memory card: CompactFlash, Micro Drive, SmartMedia, Memory Stick, Memory Stick Pro, SD Card, and MultiMediaCard + 352 + 179.99 + 6 + true + + 45.17614,-93.87341 + + diff --git a/isuifang_solr/exampledocs/post.jar b/isuifang_solr/exampledocs/post.jar new file mode 100644 index 0000000..44848c7 Binary files /dev/null and b/isuifang_solr/exampledocs/post.jar differ diff --git a/isuifang_solr/exampledocs/post.sh b/isuifang_solr/exampledocs/post.sh new file mode 100644 index 0000000..d9dd4ed --- /dev/null +++ b/isuifang_solr/exampledocs/post.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FILES=$* +URL=http://localhost:8983/solr/update + +for f in $FILES; do + echo Posting file $f to $URL + curl $URL --data-binary @$f -H 'Content-type:application/xml' + echo +done + +#send the commit command to make sure all the changes are flushed and visible +curl $URL --data-binary '' -H 'Content-type:application/xml' +echo diff --git a/isuifang_solr/exampledocs/sd500.xml b/isuifang_solr/exampledocs/sd500.xml new file mode 100644 index 0000000..fde6f49 --- /dev/null +++ b/isuifang_solr/exampledocs/sd500.xml @@ -0,0 +1,36 @@ + + + + 9885A004 + Canon PowerShot SD500 + Canon Inc. + electronics + camera + 3x zoop, 7.1 megapixel Digital ELPH + movie clips up to 640x480 @30 fps + 2.0" TFT LCD, 118,000 pixels + built in flash, red-eye reduction + 32MB SD card, USB cable, AV cable, battery + 6.4 + 329.95 + 7 + true + 2006-02-13T15:26:37Z + + 45.17614,-93.87341 + diff --git a/isuifang_solr/exampledocs/solr.xml b/isuifang_solr/exampledocs/solr.xml new file mode 100644 index 0000000..410e5f7 --- /dev/null +++ b/isuifang_solr/exampledocs/solr.xml @@ -0,0 +1,38 @@ + + + + + SOLR1000 + Solr, the Enterprise Search Server + Apache Software Foundation + software + search + Advanced Full-Text Search Capabilities using Lucene + Optimized for High Volume Web Traffic + Standards Based Open Interfaces - XML and HTTP + Comprehensive HTML Administration Interfaces + Scalability - Efficient Replication to other Solr Search Servers + Flexible and Adaptable with XML configuration and Schema + Good unicode support: héllo (hello with an accent over the e) + 0 + 10 + true + 2006-01-17T00:00:00.000Z + + + diff --git a/isuifang_solr/exampledocs/test_utf8.sh b/isuifang_solr/exampledocs/test_utf8.sh new file mode 100644 index 0000000..bf625e5 --- /dev/null +++ b/isuifang_solr/exampledocs/test_utf8.sh @@ -0,0 +1,83 @@ +#!/bin/sh +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#Test script to tell if the server is accepting UTF-8 +#The python writer currently escapes non-ascii chars, so it's good for testing + +URL=http://localhost:8983/solr + +if [ ! -z $1 ]; then + URL=$1 +fi + +curl "$URL/select?q=hello¶ms=explicit&wt=python" 2> /dev/null | grep 'hello' > /dev/null 2>&1 +if [ $? = 0 ]; then + echo "Solr server is up." +else + echo "ERROR: Solr is not up." + exit 1 +fi + +curl "$URL/select?q=h%C3%A9llo&echoParams=explicit&wt=python" 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1 +if [ $? = 0 ]; then + echo "HTTP GET is accepting UTF-8" +else + echo "ERROR: HTTP GET is not accepting UTF-8" +fi + +curl $URL/select --data-binary 'q=h%C3%A9llo&echoParams=explicit&wt=python' -H 'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1 +if [ $? = 0 ]; then + echo "HTTP POST is accepting UTF-8" +else + echo "ERROR: HTTP POST is not accepting UTF-8" +fi + +curl $URL/select --data-binary 'q=h%C3%A9llo&echoParams=explicit&wt=python' 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1 +if [ $? = 0 ]; then + echo "HTTP POST defaults to UTF-8" +else + echo "HTTP POST does not default to UTF-8" +fi + + +#A codepoint outside of the BMP +CODEPOINT='\\U00100058' +#URL encoded UTF8 of the codepoint +URL_UTF8='%F4%80%81%98' +#expected return of the python writer (currently uses UTF-16 surrogates) +EXPECTED='\\udbc0\\udc58' + +curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=python" 2> /dev/null | grep $EXPECTED > /dev/null 2>&1 +if [ $? = 0 ]; then + echo "HTTP GET is accepting UTF-8 beyond the basic multilingual plane" +else + echo "ERROR: HTTP GET is not accepting UTF-8 beyond the basic multilingual plane" +fi + +curl $URL/select --data-binary "q=$URL_UTF8&echoParams=explicit&wt=python" -H 'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null | grep $EXPECTED > /dev/null 2>&1 +if [ $? = 0 ]; then + echo "HTTP POST is accepting UTF-8 beyond the basic multilingual plane" +else + echo "ERROR: HTTP POST is not accepting UTF-8 beyond the basic multilingual plane" +fi + +curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=python" --data-binary '' 2> /dev/null | grep $EXPECTED > /dev/null 2>&1 +if [ $? = 0 ]; then + echo "HTTP POST + URL params is accepting UTF-8 beyond the basic multilingual plane" +else + echo "ERROR: HTTP POST + URL params is not accepting UTF-8 beyond the basic multilingual plane" +fi + diff --git a/isuifang_solr/exampledocs/utf8-example.xml b/isuifang_solr/exampledocs/utf8-example.xml new file mode 100644 index 0000000..99e3b0b --- /dev/null +++ b/isuifang_solr/exampledocs/utf8-example.xml @@ -0,0 +1,42 @@ + + + + + + + + UTF8TEST + Test with some UTF-8 encoded characters + Apache Software Foundation + software + search + No accents here + This is an e acute: 茅 + eaiou with circumflexes: 锚芒卯么没 + eaiou with umlauts: 毛盲茂枚眉 + tag with escaped chars: <nicetag/> + escaped ampersand: Bonnie & Clyde + 0 + + true + + + diff --git a/isuifang_solr/exampledocs/vidcard.xml b/isuifang_solr/exampledocs/vidcard.xml new file mode 100644 index 0000000..9cd3fd1 --- /dev/null +++ b/isuifang_solr/exampledocs/vidcard.xml @@ -0,0 +1,57 @@ + + + + + EN7800GTX/2DHTV/256M + ASUS Extreme N7800GTX/2DHTV (256 MB) + ASUS Computer Inc. + electronics + graphics card + NVIDIA GeForce 7800 GTX GPU/VPU clocked at 486MHz + 256MB GDDR3 Memory clocked at 1.35GHz + PCI Express x16 + Dual DVI connectors, HDTV out, video input + OpenGL 2.0, DirectX 9.0 + 16 + 479.95 + 7 + 40.7143,-74.006 + false + 2006-02-13T15:26:37Z/DAY + + + + 100-435805 + ATI Radeon X1900 XTX 512 MB PCIE Video Card + ATI Technologies + electronics + graphics card + ATI RADEON X1900 GPU/VPU clocked at 650MHz + 512MB GDDR3 SDRAM clocked at 1.55GHz + PCI Express x16 + dual DVI, HDTV, svideo, composite out + OpenGL 2.0, DirectX 9.0 + 48 + 649.99 + 7 + false + 2006-02-13T15:26:37Z/DAY + + 40.7143,-74.006 + + -- cgit v1.2.2