Hi Sammy,

I just set it up yesterday.

I you followed the instructions in the docs, you probably ran the command 
to make the schema. According to this thread 
<https://github.com/django-oscar/django-oscar/issues/2640> there is a 
problem with the generated schema. Theres a schema  provided in the thread 
(this 
link <https://github.com/django-oscar/django-oscar/files/2031635/schema.zip>) 
download it and replace the one which was generated.

That got it running for me.

If and when you need to extend your search fields, you can do so by adding 
them to the schema file and re building the index.

Stewart

On Tuesday, 28 August 2018 15:32:38 UTC+2, SammyJ wrote:
>
> Hi,
> I am following the steps provided to install solr give here:
> https://django-oscar.readthedocs.io/en/latest/howto/how_to_setup_solr.html 
> , so I have extracted the solr tar file and I have run the 
> command: ./manage.py build_solr_schema > 
> solr-4.7.2/example/solr/collection1/conf/schema.xml.
>
> Then the output shown is:
>
>
>
> Save the following output to 'schema.xml' and place it in your Solr 
> configuration directory.
>
> --------------------------------------------------------------------------------------------
>
> And after the dotted line it's blank.So I just copied this line above the 
> existing xml code in schema.xml, and ran the command 
> java -jar start.jar
>
> then I got an error, so I just removed it from the schema.xml file 
> and then I ran the same java -jar start.jar,
> the error that I get now is:
> 3552 [coreLoadExecutor-4-thread-1] ERROR 
> org.apache.solr.core.CoreContainer  – Unable to create core: collection1
> org.apache.solr.common.SolrException: Schema Parsing Failed: unknown field 
> 'id'. Schema file is 
> /home/netzary/SamuelProjects/cecilia_new2/cecilia/solr-4.7.2/example/solr/collection1/schema.xml
>         at 
> org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:618)
>         at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:166)
>         at 
> org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)
>         at 
> org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)
>         at 
> org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:559)
>         at 
> org.apache.solr.core.CoreContainer.create(CoreContainer.java:597)
>         at 
> org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258)
>         at 
> org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:250)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.RuntimeException: unknown field 'id'
>         at 
> org.apache.solr.schema.IndexSchema.getIndexedField(IndexSchema.java:340)
>         at 
> org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:536)
>         ... 13 more
> 3561 [coreLoadExecutor-4-thread-1] ERROR 
> org.apache.solr.core.CoreContainer  – 
> null:org.apache.solr.common.SolrException: Unable to create core: 
> collection1
>         at 
> org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:989)
>         at 
> org.apache.solr.core.CoreContainer.create(CoreContainer.java:606)
>         at 
> org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258)
>         at 
> org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:250)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: org.apache.solr.common.SolrException: Schema Parsing Failed: 
> unknown field 'id'. Schema file is 
> /home/netzary/SamuelProjects/cecilia_new2/cecilia/solr-4.7.2/example/solr/collection1/schema.xml
>         at 
> org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:618)
>         at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:166)
>         at 
> org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)
>         at 
> org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)
>         at 
> org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:559)
>         at 
> org.apache.solr.core.CoreContainer.create(CoreContainer.java:597)
>         ... 8 more
> Caused by: java.lang.RuntimeException: unknown field 'id'
>         at 
> org.apache.solr.schema.IndexSchema.getIndexedField(IndexSchema.java:340)
>         at 
> org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:536)
>         ... 13 more
>
> 3564 [main] INFO  org.apache.solr.servlet.SolrDispatchFilter  – 
> user.dir=/home/netzary/SamuelProjects/cecilia_new2/cecilia/solr-4.7.2/example
> 3565 [main] INFO  org.apache.solr.servlet.SolrDispatchFilter  – 
> SolrDispatchFilter.init() done
> 3619 [main] INFO  org.eclipse.jetty.server.AbstractConnector  – Started 
> SocketConnector@0.0.0.0:8983
>     
>
>
> How do I solve this? Is there something wrong with the XML file or the 
> command that I ran?I am not able to figure.
>

-- 
https://github.com/django-oscar/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
--- 
You received this message because you are subscribed to the Google Groups 
"django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-oscar+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-oscar.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/django-oscar/b87860d3-3aa9-4a5a-88aa-29774bdbea1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to