Need help on Solr

2013-06-20 Thread Abhishek Bansal
invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.solr.common.SolrException: [schema.xml] Duplicate
field definition for 'id'
[[[id{type=string,properties=indexed,stored,omitNorms,omitTermFreqAndPositions,sortMissingLast,required,
required=true}]]] and
[[[id{type=string,properties=indexed,stored,omitNorms,omitTermFreqAndPositions,sortMissingLast,required,
required=true}]]]
 at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:502)
at org.apache.solr.schema.IndexSchema.(IndexSchema.java:176)
 at
org.apache.solr.schema.ClassicIndexSchemaFactory.create(ClassicIndexSchemaFactory.java:62)
at
org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:36)
 at
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:946)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
 at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:592)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
 at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
... 1 more




with regards,
Abhishek Bansal


Re: Need help on Solr

2013-06-20 Thread Abhishek Bansal
Yeah I know, out of the box there is one id field. I removed it from
schema.xml

I have also added below code to automatically generate an ID.


   
   

with regards,
Abhishek Bansal


On 20 June 2013 21:49, Shreejay  wrote:

> org.apache.solr.common.SolrException: [schema.xml] Duplicate field
> definition for 'id'
>
> You might have defined an id field in the schema file. The out of box
> schema file already contains an id field .
>
> --
> Shreejay
>
>
> On Thursday, June 20, 2013 at 9:16, Abhishek Bansal wrote:
>
> > Hello,
> >
> > I am trying to index a pdf file on Solr. I am running icurrently Solr on
> > Apache Tomcat 6.
> >
> > When I try to index it I get below error. Please help. I was not able to
> > rectify this error with help of internet.
> >
> >
> >
> >
> > ERROR - 2013-06-20 20:43:41.549; org.apache.solr.core.CoreContainer;
> Unable
> > to create core: collection1
> > org.apache.solr.common.SolrException: [schema.xml] Duplicate field
> > definition for 'id'
> >
> [[[id{type=string,properties=indexed,stored,omitNorms,omitTermFreqAndPositions,sortMissingLast,required,
> > required=true}]]] and
> >
> [[[id{type=string,properties=indexed,stored,omitNorms,omitTermFreqAndPositions,sortMissingLast,required,
> > required=true}]]]
> > at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:502)
> > at org.apache.solr.schema.IndexSchema.(IndexSchema.java:176)
> > at
> >
> org.apache.solr.schema.ClassicIndexSchemaFactory.create(ClassicIndexSchemaFactory.java:62)
> > at
> >
> org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:36)
> > at
> >
> org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:946)
> > at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
> > at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
> > at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:592)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> > at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> > at java.lang.Thread.run(Thread.java:662)
> > ERROR - 2013-06-20 20:43:41.551; org.apache.solr.common.SolrException;
> > null:org.apache.solr.common.SolrException: Unable to create core:
> > collection1
> > at
> >
> org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:1450)
> > at org.apache.solr.core.CoreContainer.create(CoreContainer.java:993)
> > at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
> > at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:592)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> > at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> > at java.lang.Thread.run(Thread.java:662)
> > Caused by: org.apache.solr.common.SolrException: [schema.xml] Duplicate
> > field definition for 'id'
> >
> [[[id{type=string,properties=indexed,stored,omitNorms,omitTermFreqAndPositions,sortMissingLast,required,
> > required=true}]]] and
> >
> [[[id{type=string,properties=indexed,stored,omitNorms,omitTermFreqAndPositions,sortMissingLast,required,
> > required=true}]]]
> > at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:502)
> > at org.apache.solr.schema.IndexSchema.(IndexSchema.java:176)
> > at
> >
> org.apache.solr.schema.ClassicIndexSchemaFactory.create(ClassicIndexSchemaFactory.java:62)
> > at
> >
> org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:36)
> > at
> >
> org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:946)
> > at org.apache.solr.core.CoreContainer.create(CoreContainer.java:9

Re: Need help on Solr

2013-06-20 Thread Abhishek Bansal
As I am running Solr on windows + tomcat I am using below command to index
pdf. I hope this command is not faulty. Please check

java -jar -Durl="
http://localhost:8080/solr-4.3.0/update/extract?literal.id=1&commit=true";
post.jar sample.pdf

with regards,
Abhishek Bansal


On 20 June 2013 21:56, Abhishek Bansal  wrote:

> Yeah I know, out of the box there is one id field. I removed it from
> schema.xml
>
> I have also added below code to automatically generate an ID.
>
>  multiValued="false"/>
>
>
>
> with regards,
> Abhishek Bansal
>
>
> On 20 June 2013 21:49, Shreejay  wrote:
>
>> org.apache.solr.common.SolrException: [schema.xml] Duplicate field
>> definition for 'id'
>>
>> You might have defined an id field in the schema file. The out of box
>> schema file already contains an id field .
>>
>> --
>> Shreejay
>>
>>
>> On Thursday, June 20, 2013 at 9:16, Abhishek Bansal wrote:
>>
>> > Hello,
>> >
>> > I am trying to index a pdf file on Solr. I am running icurrently Solr on
>> > Apache Tomcat 6.
>> >
>> > When I try to index it I get below error. Please help. I was not able to
>> > rectify this error with help of internet.
>> >
>> >
>> >
>> >
>> > ERROR - 2013-06-20 20:43:41.549; org.apache.solr.core.CoreContainer;
>> Unable
>> > to create core: collection1
>> > org.apache.solr.common.SolrException: [schema.xml] Duplicate field
>> > definition for 'id'
>> >
>> [[[id{type=string,properties=indexed,stored,omitNorms,omitTermFreqAndPositions,sortMissingLast,required,
>> > required=true}]]] and
>> >
>> [[[id{type=string,properties=indexed,stored,omitNorms,omitTermFreqAndPositions,sortMissingLast,required,
>> > required=true}]]]
>> > at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:502)
>> > at org.apache.solr.schema.IndexSchema.(IndexSchema.java:176)
>> > at
>> >
>> org.apache.solr.schema.ClassicIndexSchemaFactory.create(ClassicIndexSchemaFactory.java:62)
>> > at
>> >
>> org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:36)
>> > at
>> >
>> org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:946)
>> > at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
>> > at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
>> > at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:592)
>> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>> > at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
>> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>> > at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
>> > at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
>> > at java.lang.Thread.run(Thread.java:662)
>> > ERROR - 2013-06-20 20:43:41.551; org.apache.solr.common.SolrException;
>> > null:org.apache.solr.common.SolrException: Unable to create core:
>> > collection1
>> > at
>> >
>> org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:1450)
>> > at org.apache.solr.core.CoreContainer.create(CoreContainer.java:993)
>> > at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
>> > at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:592)
>> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>> > at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
>> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>> > at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
>> > at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
>> > at java.lang.Thread.run(Thread.java:662)
>> > Caused by: org.apache.solr.common.SolrException: [schema.xml] Duplicate
>> > field definition for 'id'
>> >
>> [[[id{type=string,properties=indexe