Haystack en Solr-Schema Parsing mislukt

Ik probeer rebuild_index te maken, maar na het maken van het schema (manage.py build_solr_schema) kopieer en plak ik de uitvoer in het schema schema.xml. Na het herstarten van de server en rebuild_index (manage.py rebuild_index) krijg ik de onderstaande foutmelding. Ik heb geprobeerd het probleem op te lossen, maar geen succes! Wat mis ik? Moet ik eerst de XML-codes in het schemabestand verwijderen voordat ik de nieuwe codeer?

  HTTP Status 500 - Severe errors in solr configuration. Check your log files for more detailed information on what may be wrong. If you want solr to continue after configuration errors, change: false in solr.xml -------------------------------------------------------------
  org.apache.solr.common.SolrException: No cores were created, please check the logs for  errors at org.apache.solr.core.CoreContainer$Initializer.initialize    (CoreContainer.java:172) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:96) at
  org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277) at   org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4649) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5305) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 
  ------------------------------------------------------------- org.apache.solr.common.SolrException: Schema Parsing Failed: Attribute name "omitN" associated with an element type "fieldtype" must be followed by the ' = ' character. at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:688) at org.apache.solr.schema.IndexSchema.(IndexSchema.java:123) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:481) at org.apache.solr.core.CoreContainer.load(CoreContainer.java:335) at org.apache.solr.core.CoreContainer.load(CoreContainer.java:219) at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:161) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:96) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4649) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5305) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run (Unknown Source) Caused by: org.xml.sax.SAXParseException: Attribute name "omitN" associated with an element type "fieldtype" must be followed by the ' = ' character. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException  (Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError  (Unknown Source)   at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument  (Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.apache.solr.core.Config.(Config.java:159) at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:418) ... 24 more       ------------------------------------------------------------- org.xml.sax.SAXParseException: Attribute name "omitN" associated with an element type "fieldtype" must be followed by the ' = ' character. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException (Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError (Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError  (Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.apache.solr.core.Config.(Config.java:159) at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:418) at org.apache.solr.schema.IndexSchema.(IndexSchema.java:123) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:481) at org.apache.solr.core.CoreContainer.load(CoreContainer.java:335) at org.apache.solr.core.CoreContainer.load(CoreContainer.java:219) at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:161) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:96) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4649) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5305) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 

De Schema-uitvoer

        <?xml version="1.0" ?>
        <!--
         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.
         -->

         
           
            
            
            

            <!-- Numeric field types that manipulate the value into
              a string value that isn't human-readable in its internal form,
             but with a lexicographic ordering the same as the numeric ordering,
             so that range queries work correctly. -->
           
          
          
          

          
          
          
         

         
        <!-- A Trie based date field for faster date range queries and date facetin. ->
       

       
       
       

       
       
       
       
       <!-- in this example, we will only use synonyms at query time
       
        -->
       
       
       
       
       
       
      
      
     

     

      
       
       
      
      
      
      <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
       -->
      
      
      
      
      
       
        
        
        
        <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
       -->
      
      
      

      

      
        
      
     

     
         
    
    
    
    
    
    
    
     
     

     
     
    
    
    
    
    
    
    
    
    
     
     
     

     
      <!-- general -->
      
      
      

      
      
      
      
      
      
      
      
      
      


      

      

      

      

      

      

      

      

      <!-- field to use to determine and enforce document uniqueness. -->
      id

      <!-- field for the QueryParser to use when an explicit fieldname is absent -->

      text

      <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
      
      
2

2 antwoord

Ik voer Solr niet uit, dus kan dit niet testen, maar een paar problemen springen uit bij mij (nauwkeuriger gezegd, worden als fouten gemarkeerd wanneer ik de xml probeer te frappeteren :-))

  • line 40 (<!-- A Trie based date field ...) ends in ->; should be -->

  • line 59 () contains ignore Case="true"; should be ignoreCase="true" (no space in attr name)

Als u deze fouten oplost, zal dit waarschijnlijk uw probleem oplossen.

1
toegevoegd
Bedankt ... zal het proberen. Ik ben overgestapt op whoosh en het werkt. Ik weet niet waarom Solr me hoofdpijn bezorgt.
toegevoegd de auteur picomon, de bron

Django Haystack ondersteunt alleen Solr 3.5+

http://django-haystack.readthedocs.org/en/latest/backend_support .html # id1

Als u Solr 1.4 gebruikt, is het schema-formaat gewijzigd tussen 1.4 en 3.5

1
toegevoegd
Dit is het probleem. Zeer frustrerend, aangezien de enige echte oplossing is om Solr 3.5 helemaal opnieuw te installeren, wat een nachtmerrie is.
toegevoegd de auteur Cerin, de bron