RE: Solr MySQL Adding new column to table

2010-11-02 Thread Ephraim Ofir
Your uniqueKey field is defined as id (in schema.xml) and your query
doesn't return an id field.

Ephraim Ofir

-Original Message-
From: nitin.vanaku...@gmail.com [mailto:nitin.vanaku...@gmail.com] 
Sent: Tuesday, November 02, 2010 12:10 PM
To: solr-user@lucene.apache.org
Subject: RE: Solr MySQL Adding new column to table


ok. i have one more issue.
i am getting following exception can you please explore on it


INFO: Creating a connection for entity person with URL:
jdbc:mysql://localhost:3306/example
Nov 2, 2010 3:34:11 PM
org.apache.solr.handler.dataimport.JdbcDataSource$1
call
INFO: Time taken for getConnection(): 250
Nov 2, 2010 3:34:11 PM org.apache.solr.handler.dataimport.SolrWriter
upload
WARNING: Error creating document :
SolrInputDocument[{eage=eage(1.0)={28},
ename=ename(1.0)={shree}, eid=eid(1.0)={1}}]
org.apache.solr.common.SolrException: Document is missing uniqueKey
field id
at
org.apache.solr.update.UpdateHandler.getIndexedId(UpdateHandler.java:115
)
at
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.
java:230)
at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdate
ProcessorFactory.java:61)
at
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:75)
at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImport
Handler.java:292)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.j
ava:392)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java
:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:18
0)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporte
r.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java
:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:
370)
Nov 2, 2010 3:34:11 PM org.apache.solr.handler.dataimport.SolrWriter
upload
WARNING: Error creating document :
SolrInputDocument[{eage=eage(1.0)={29},
ename=ename(1.0)={ramesh}, eid=eid(1.0)={2}}]
org.apache.solr.common.SolrException: Document is missing uniqueKey
field id
at
org.apache.solr.update.UpdateHandler.getIndexedId(UpdateHandler.java:115
)
at
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.
java:230)
at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdate
ProcessorFactory.java:61)
at
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:75)
at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImport
Handler.java:292)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.j
ava:392)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java
:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:18
0)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporte
r.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java
:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:
370)
Nov 2, 2010 3:34:11 PM org.apache.solr.handler.dataimport.DocBuilder
finish
INFO: Import completed successfully
Nov 2, 2010 3:34:11 PM org.apache.solr.update.DirectUpdateHandler2
commit
INFO: start
commit(optimize=true,waitFlush=false,waitSearcher=true,expungeDeletes=fa
lse)
-- 
View this message in context:
http://lucene.472066.n3.nabble.com/Solr-MySQL-Adding-new-column-to-table
-tp1826759p1827093.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Solr MySQL Adding new column to table

2010-11-02 Thread nitin.vanaku...@gmail.com

ok. i have one more issue.
i am getting following exception can you please explore on it


INFO: Creating a connection for entity person with URL:
jdbc:mysql://localhost:3306/example
Nov 2, 2010 3:34:11 PM org.apache.solr.handler.dataimport.JdbcDataSource$1
call
INFO: Time taken for getConnection(): 250
Nov 2, 2010 3:34:11 PM org.apache.solr.handler.dataimport.SolrWriter upload
WARNING: Error creating document : SolrInputDocument[{eage=eage(1.0)={28},
ename=ename(1.0)={shree}, eid=eid(1.0)={1}}]
org.apache.solr.common.SolrException: Document is missing uniqueKey field id
at
org.apache.solr.update.UpdateHandler.getIndexedId(UpdateHandler.java:115)
at
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:230)
at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:61)
at 
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:75)
at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:292)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:392)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:370)
Nov 2, 2010 3:34:11 PM org.apache.solr.handler.dataimport.SolrWriter upload
WARNING: Error creating document : SolrInputDocument[{eage=eage(1.0)={29},
ename=ename(1.0)={ramesh}, eid=eid(1.0)={2}}]
org.apache.solr.common.SolrException: Document is missing uniqueKey field id
at
org.apache.solr.update.UpdateHandler.getIndexedId(UpdateHandler.java:115)
at
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:230)
at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:61)
at 
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:75)
at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:292)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:392)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:370)
Nov 2, 2010 3:34:11 PM org.apache.solr.handler.dataimport.DocBuilder finish
INFO: Import completed successfully
Nov 2, 2010 3:34:11 PM org.apache.solr.update.DirectUpdateHandler2 commit
INFO: start
commit(optimize=true,waitFlush=false,waitSearcher=true,expungeDeletes=false)
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-MySQL-Adding-new-column-to-table-tp1826759p1827093.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Solr MySQL Adding new column to table

2010-11-02 Thread Ephraim Ofir
Not if you use 'SELECT * FROM person'

Ephraim Ofir

-Original Message-
From: nitin.vanaku...@gmail.com [mailto:nitin.vanaku...@gmail.com] 
Sent: Tuesday, November 02, 2010 11:19 AM
To: solr-user@lucene.apache.org
Subject: RE: Solr MySQL Adding new column to table


Hi Sivaprasad,

first of all thanks for your kind response.
i gone through that link,
if i use the dynamicField concept,still  i need to alter the query in
data-config.xml right! 

thanks 
Nitin
-- 
View this message in context:
http://lucene.472066.n3.nabble.com/Solr-MySQL-Adding-new-column-to-table
-tp1826759p1826865.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Solr MySQL Adding new column to table

2010-11-02 Thread nitin.vanaku...@gmail.com

Hi Sivaprasad,

first of all thanks for your kind response.
i gone through that link,
if i use the dynamicField concept,still  i need to alter the query in
data-config.xml right! 

thanks 
Nitin
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-MySQL-Adding-new-column-to-table-tp1826759p1826865.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Solr MySQL Adding new column to table

2010-11-02 Thread sivaprasad

You have to change the old configuration for the newly added field.Or you can 
use dynamic fields concept.

Go through the link
http://wiki.apache.org/solr/SchemaXml




-Original Message-
From: "nitin.vanaku...@gmail.com [via Lucene]" 

Sent: Tuesday, November 2, 2010 4:50am
To: "sivaprasad" 
Subject: Solr MySQL Adding new column to table

Hello Techies,

I am new to Solr, i am using it with mysql.
Suppose i have table called person in mysql with two columns name,  age
and i have configured mysql in solr. now i have added a new column to person
table called phoneNumber, is it possible for solr to recognize new column 
dynamically ?
i mean with out changing old configuration.
thanks in advance

Nitin


View message @ 
[http://lucene.472066.n3.nabble.com/Solr-MySQL-Adding-new-column-to-table-tp1826759p1826759.html]
 
http://lucene.472066.n3.nabble.com/Solr-MySQL-Adding-new-column-to-table-tp1826759p1826759.html
To start a new topic under Solr - User, email 
ml-node+472068-1030716887-225...@n3.nabble.com
To unsubscribe from Solr - User, 
[http://lucene.472066.n3.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=472068&code=c2l2YXByYXNhZC5qQGVjaGlkbmFpbmMuY29tfDQ3MjA2OHwtMjAyODMzMTY4OQ==]
 click here.

-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-MySQL-Adding-new-column-to-table-tp1826759p1826792.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr MySQL Adding new column to table

2010-11-02 Thread nitin.vanaku...@gmail.com

Hello Techies,

I am new to Solr, i am using it with mysql.
Suppose i have table called person in mysql with two columns name,  age
and i have configured mysql in solr. now i have added a new column to person
table called phoneNumber, is it possible for solr to recognize new column
dynamically ?
i mean with out changing old configuration.
thanks in advance

Nitin
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-MySQL-Adding-new-column-to-table-tp1826759p1826759.html
Sent from the Solr - User mailing list archive at Nabble.com.