我在
Windows Server 2012上安装了Solr 5.0.0.我想将表中的所有数据加载到solr引擎中.
我的data-config.xml看起来像这样:
driver="com.MysqL.jdbc.Driver"
url="jdbc:MysqL://localhost:3306/database"
user="root"
password="root"/>
pk="id"
query="SELECT ID,LASTNAME FROM my_table limit 2">
当我选择dataimport时,我得到了一个答案:
Indexing completed. Added/Updated: 2 documents. Deleted 0 documents
Requests: 1,Fetched: 2,Skipped: 0,Processed: 2
和原始调试响应:
{
"responseHeader": {
"status": 0,"QTime": 280
},"initArgs": [
"defaults",[
"config","data-config.xml"
]
],"command": "full-import","mode": "debug","documents": [
{
"id": [
1983
],"_version_": [
1497798459776827400
]
},{
"id": [
1984
],"_version_": [
1497798459776827400
]
}
],"verbose-output": [
"entity:my_table",[
"document#1",[
"query","SELECT ID,LASTNAME FROM my_table limit 2","time-taken","0:0:0.8",null,"----------- row #1-------------","LASTNAME","Gates","ID",1983,"---------------------------------------------"
],"document#2",[
null,"Doe",1984,"document#3",[]
]
],"status": "idle","importResponse": "","statusMessages": {
"Total Requests made to DataSource": "1","Total Rows Fetched": "2","Total Documents Skipped": "0","Full Dump Started": "2015-04-07 15:05:22","": "Indexing completed. Added/Updated: 2 documents. Deleted 0 documents.","Committed": "2015-04-07 15:05:22","Optimized": "2015-04-07 15:05:22","Total Documents Processed": "2","Time taken": "0:0:0.270"
}
}
最后当我要求索尔时
http://localhost:8983/solr/test/query?q=*:*
我有一个答案:
{
"responseHeader":{
"status":0,"QTime":0,"params":{
"q":"*:*"}},"response":{"numFound":2,"start":0,"docs":[
{
"id":"1983","_version_":1497798459776827392},{
"id":"1984","_version_":1497798459776827393}]
}}
我也希望看到lastname列.为什么我不能?