Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27647

Java error in solr when executing solr4 with ezplatform 1.7.4 solr configuration files

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Done
    • Affects Version/s: 1.7.4-rc, 1.10.1
    • Fix Version/s: QA tracked issues, 1.11.0
    • Labels:
    • Environment:

      Operating System: Debian 8
      PHP Version: 5.6.30-0+deb8u1
      Database and version: Mysql 5.5.54-0+deb8u1
      Browser (and version): Firefox 54
      Env: Prod

      Description

      When I start solr 4.10.4 (using the updated configuration files from ezplatform 1.7.4), I have the following error

      3064 [searcherExecutor-6-thread-1] ERROR org.apache.solr.core.SolrCore  – org.apache.solr.common.SolrException: undefined field text
      	at org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1269)
      	at org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getWrappedAnalyzer(IndexSchema.java:434)
      	at org.apache.lucene.analysis.DelegatingAnalyzerWrapper$DelegatingReuseStrategy.getReusableComponents(DelegatingAnalyzerWrapper.java:74)
      	at org.apache.lucene.analysis.Analyzer.tokenStream(Analyzer.java:175)
      	at org.apache.lucene.util.QueryBuilder.createFieldQuery(QueryBuilder.java:207)
      	at org.apache.solr.parser.SolrQueryParserBase.newFieldQuery(SolrQueryParserBase.java:374)
      	at org.apache.solr.parser.SolrQueryParserBase.getFieldQuery(SolrQueryParserBase.java:742)
      	at org.apache.solr.parser.SolrQueryParserBase.handleBareTokenQuery(SolrQueryParserBase.java:541)
      	at org.apache.solr.parser.QueryParser.Term(QueryParser.java:299)
      	at org.apache.solr.parser.QueryParser.Clause(QueryParser.java:185)
      	at org.apache.solr.parser.QueryParser.Query(QueryParser.java:107)
      	at org.apache.solr.parser.QueryParser.TopLevelQuery(QueryParser.java:96)
      	at org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:151)
      	at org.apache.solr.search.LuceneQParser.parse(LuceneQParser.java:50)
      	at org.apache.solr.search.QParser.getQuery(QParser.java:141)
      	at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:147)
      	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:197)
      	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
      	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1976)
      	at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:64)
      	at org.apache.solr.core.SolrCore$5.call(SolrCore.java:1748)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      

      This error does not happen when using solr 6.4.2

        Activity

        Hide
        Eduardo Fernandes (Inactive) added a comment -

        Verified by QA Team

        Show
        Eduardo Fernandes (Inactive) added a comment - Verified by QA Team
        Show
        André Rømcke added a comment - Merged: https://github.com/ezsystems/ezplatform-solr-search-engine/commit/227943235cebd1773fd22ce573023a3f607a91ab
        Hide
        Kamil Madejski added a comment -

        Confirmed also in eZ Platform 1.10.1.
        Issue appears when ezsystems/ezplatform-solr-search-engine is installed in version >=1.4.0.
        It is caused by the removal of this line:
        https://github.com/ezsystems/ezplatform-solr-search-engine/blob/1.3/lib/Resources/config/solr/schema.xml#L109 in https://github.com/ezsystems/ezplatform-solr-search-engine/commit/be8cb5de63851d489d1bfb93bdb4671b844f21cf
        Without mentioned line, every query returns an error, e.g.:

        {
          "responseHeader": {
            "status": 400,
            "QTime": 6,
            "params": {
              "q": "*query*",
              "indent": "true",
              "wt": "json",
              "_": "1502280815137"
            }
          },
          "error": {
            "msg": "undefined field text",
            "code": 400
          }
        }
        

        André Rømcke could we restore this line? I think that Solr 4.10.4 requires this line because default solr/collection1/conf/elevate.xml contains:

        <elevate>
         <query text="foo bar">
          <doc id="1" />
          <doc id="2" />
          <doc id="3" />
         </query>
         
         <query text="ipod">
           <doc id="MA147LL/A" />  <!-- put the actual ipod at the top -->
           <doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
         </query>
         
        </elevate>
        

        and if I understood correctly, Solr tries to execute query using field text which is undefined in our schema.xml.
        I've tried to change query field in elevate.xml but I got:

        3104 [coreLoadExecutor-5-thread-1] ERROR org.apache.solr.core.CoreContainer  – Error creating core [collection1]: Error initializing QueryElevationComponent.
        org.apache.solr.common.SolrException: Error initializing QueryElevationComponent.
        ...
        Caused by: org.apache.solr.common.SolrException: Error initializing QueryElevationComponent.
        ...
        Caused by: java.lang.RuntimeException: missing query 'text': missing mandatory attribute 'text'
        ...
        

        Show
        Kamil Madejski added a comment - Confirmed also in eZ Platform 1.10.1. Issue appears when ezsystems/ezplatform-solr-search-engine is installed in version >=1.4.0 . It is caused by the removal of this line: https://github.com/ezsystems/ezplatform-solr-search-engine/blob/1.3/lib/Resources/config/solr/schema.xml#L109 in https://github.com/ezsystems/ezplatform-solr-search-engine/commit/be8cb5de63851d489d1bfb93bdb4671b844f21cf Without mentioned line, every query returns an error, e.g.: { "responseHeader": { "status": 400, "QTime": 6, "params": { "q": "*query*", "indent": "true", "wt": "json", "_": "1502280815137" } }, "error": { "msg": "undefined field text", "code": 400 } } André Rømcke could we restore this line? I think that Solr 4.10.4 requires this line because default solr/collection1/conf/elevate.xml contains: <elevate> <query text="foo bar"> <doc id="1" /> <doc id="2" /> <doc id="3" /> </query>   <query text="ipod"> <doc id="MA147LL/A" /> <!-- put the actual ipod at the top --> <doc id="IW-02" exclude="true" /> <!-- exclude this cable --> </query>   </elevate> and if I understood correctly, Solr tries to execute query using field text which is undefined in our schema.xml . I've tried to change query field in elevate.xml but I got: 3104 [coreLoadExecutor-5-thread-1] ERROR org.apache.solr.core.CoreContainer – Error creating core [collection1]: Error initializing QueryElevationComponent. org.apache.solr.common.SolrException: Error initializing QueryElevationComponent. ... Caused by: org.apache.solr.common.SolrException: Error initializing QueryElevationComponent. ... Caused by: java.lang.RuntimeException: missing query 'text': missing mandatory attribute 'text' ...
        Hide
        Rui Silva (Inactive) added a comment -

        Confirmed.
        Happened to me too.

        Show
        Rui Silva (Inactive) added a comment - Confirmed. Happened to me too.

          People

          • Assignee:
            Unassigned
            Reporter:
            Paulo Nunes (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: