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

        Paulo Nunes (Inactive) created issue -
        Rui Silva (Inactive) made changes -
        Field Original Value New Value
        Status Open [ 1 ] Confirmed [ 10037 ]
        Hide
        Rui Silva (Inactive) added a comment -

        Confirmed.
        Happened to me too.

        Show
        Rui Silva (Inactive) added a comment - Confirmed. Happened to me too.
        Paulo Nunes (Inactive) made changes -
        Summary Java error in solr when executing solr4 with ezplatform 1.7.4 schema Java error in solr when executing solr4 with ezplatform 1.7.4 solr schema
        Paulo Nunes (Inactive) made changes -
        Summary Java error in solr when executing solr4 with ezplatform 1.7.4 solr schema Java error in solr when executing solr4 with ezplatform 1.7.4 solr configuration files
        Paulo Nunes (Inactive) made changes -
        Description When I start solr 4.10.4 (using the updated schema from ezplatform 1.7.4), I have the following error
        {noformat}
        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)
        {noformat}

        This error does not happen when using solr 6.4.2
        When I start solr 4.10.4 (using the updated configuration files from ezplatform 1.7.4), I have the following error
        {noformat}
        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)
        {noformat}

        This error does not happen when using solr 6.4.2
        Kamil Madejski made changes -
        Affects Version/s 1.10.1 [ 14808 ]
        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' ...
        André Rømcke made changes -
        Status Confirmed [ 10037 ] Backlog [ 10000 ]
        André Rømcke made changes -
        Status Backlog [ 10000 ] Development [ 3 ]
        Assignee André Rømcke [ andre.romcke@ez.no ]
        Show
        André Rømcke added a comment - Merged: https://github.com/ezsystems/ezplatform-solr-search-engine/commit/227943235cebd1773fd22ce573023a3f607a91ab
        André Rømcke made changes -
        Status Development [ 3 ] Development Review done [ 10028 ]
        Fix Version/s 1.11.0-beta1 [ 14801 ]
        Assignee André Rømcke [ andre.romcke@ez.no ]
        Michał Maciej Kusztelak (Inactive) made changes -
        Assignee Michał Maciej Kusztelak [ michal.kusztelak@ez.no ]
        Michał Maciej Kusztelak (Inactive) made changes -
        Assignee Michał Maciej Kusztelak [ michal.kusztelak@ez.no ]
        Dominika Kurek made changes -
        Status Development Review done [ 10028 ] Documentation [ 10010 ]
        Assignee Dominika Kurek [ dominika.kurek@ez.no ]
        Dominika Kurek made changes -
        Status Documentation [ 10010 ] Documentation Review [ 10039 ]
        Dominika Kurek made changes -
        Status Documentation Review [ 10039 ] Documentation Review done [ 10011 ]
        Assignee Dominika Kurek [ dominika.kurek@ez.no ]
        Hide
        Eduardo Fernandes (Inactive) added a comment -

        Verified by QA Team

        Show
        Eduardo Fernandes (Inactive) added a comment - Verified by QA Team
        Eduardo Fernandes (Inactive) made changes -
        Status Documentation Review done [ 10011 ] Closed [ 6 ]
        Resolution Done [ 9 ]
        Alex Schuster made changes -
        Workflow EZ* Development Workflow [ 104578 ] EZEE Development Workflow [ 126604 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Confirmed Confirmed
        1m 11s 1 rui.silva@ez.no 11/Jul/17 9:45 AM
        Confirmed Confirmed Backlog Backlog
        31d 4h 19m 1 André Rømcke 11/Aug/17 2:05 PM
        Backlog Backlog Development Development
        5s 1 André Rømcke 11/Aug/17 2:05 PM
        Development Development Development Review done Development Review done
        30s 1 André Rømcke 11/Aug/17 2:05 PM
        Development Review done Development Review done Documentation Documentation
        4d 19h 29m 1 Dominika Kurek 16/Aug/17 9:34 AM
        Documentation Documentation Documentation Review Documentation Review
        3s 1 Dominika Kurek 16/Aug/17 9:35 AM
        Documentation Review Documentation Review Documentation Review done Documentation Review done
        6s 1 Dominika Kurek 16/Aug/17 9:35 AM
        Documentation Review done Documentation Review done Closed Closed
        3h 25m 1 eduardo.fernandes@ez.no 16/Aug/17 1:00 PM

          People

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

            Dates

            • Created:
              Updated:
              Resolved: