<tfoot id='RKf42'></tfoot>
  • <small id='RKf42'></small><noframes id='RKf42'>

        <bdo id='RKf42'></bdo><ul id='RKf42'></ul>
    1. <legend id='RKf42'><style id='RKf42'><dir id='RKf42'><q id='RKf42'></q></dir></style></legend>
        <i id='RKf42'><tr id='RKf42'><dt id='RKf42'><q id='RKf42'><span id='RKf42'><b id='RKf42'><form id='RKf42'><ins id='RKf42'></ins><ul id='RKf42'></ul><sub id='RKf42'></sub></form><legend id='RKf42'></legend><bdo id='RKf42'><pre id='RKf42'><center id='RKf42'></center></pre></bdo></b><th id='RKf42'></th></span></q></dt></tr></i><div id='RKf42'><tfoot id='RKf42'></tfoot><dl id='RKf42'><fieldset id='RKf42'></fieldset></dl></div>
      1. SOLR 数据导入错误“无法执行查询"

        时间:2024-04-15

          <i id='idVFu'><tr id='idVFu'><dt id='idVFu'><q id='idVFu'><span id='idVFu'><b id='idVFu'><form id='idVFu'><ins id='idVFu'></ins><ul id='idVFu'></ul><sub id='idVFu'></sub></form><legend id='idVFu'></legend><bdo id='idVFu'><pre id='idVFu'><center id='idVFu'></center></pre></bdo></b><th id='idVFu'></th></span></q></dt></tr></i><div id='idVFu'><tfoot id='idVFu'></tfoot><dl id='idVFu'><fieldset id='idVFu'></fieldset></dl></div>
          <tfoot id='idVFu'></tfoot>

                <tbody id='idVFu'></tbody>

                <bdo id='idVFu'></bdo><ul id='idVFu'></ul>
                • <small id='idVFu'></small><noframes id='idVFu'>

                  <legend id='idVFu'><style id='idVFu'><dir id='idVFu'><q id='idVFu'></q></dir></style></legend>
                • 本文介绍了SOLR 数据导入错误“无法执行查询"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个在 Amazon EC2 实例上运行的网站,我正在尝试让 Solr 与我正在使用的数据库进行交互和使用.我能够使用管理界面并已将示例 xml 文件编入索引,但是每当我尝试导入我的数据库表之一时,我都会收到错误

                  I have a website running on an Amazon EC2 Instance, and I'm trying to get Solr to interface and work with the database I'm using. I'm able to use the admin interface and have gotten the example xml files indexed, but whenever I try to import one of my database tables, I get the error

                  SEVERE: Exception while processing: gamelydb document : SolrInputDocument[{}]:org.apache.solr.handler.dataimport.DataImportHandlerException:
                   Unable to execute query: SELECT * FROM league Processing Document # 1
                  

                  这是我的 data-config.xml 文件.我还在 solrconfig.xml 文件中添加了 dataimporthandler.

                  Here's my data-config.xml file. I also added the dataimporthandler to the solrconfig.xml file.

                  <dataConfig>
                    <dataSource type="JdbcDataSource"
                                driver="com.mysql.jdbc.Driver"
                                url="jdbc:mysql://www.mysite.com/mydb"
                                user="root"
                                password="mypassword"/>
                    <document>
                      <entity name="mydb"
                              query="SELECT * FROM league">
                         <field column="id" name="id" />
                         <field column="leaguename" name="leaguename" />
                      </entity>
                    </document>
                  </dataConfig>
                  

                  知道为什么会这样吗?如果我需要澄清任何事情,请告诉我.

                  Any idea why this is happening? And just let me know if I need to clarify anything.

                  所以我稍微更改了 url 并删除了http://",该错误似乎消失了.但是,似乎无法通过管理员搜索任何信息.现在数据目录中有几个文件(_1.fnm、_1.frq、...).这是 solr 打印到日志的内容.

                  So I changed the url a bit and removed the 'http://' and that error seemed to go away. However none of the information seems to be searchable through the admin. There are now a few files in the data directory (_1.fnm, _1.frq,...). Here is what solr prints to the log.

                  Jul 13, 2011 1:19:45 PM org.apache.solr.core.SolrCore execute
                  INFO: [] webapp=/solr path=/dataimport params={} status=0 QTime=4
                  Jul 13, 2011 1:19:48 PM org.apache.solr.core.SolrCore execute
                  INFO: [] webapp=/solr path=/dataimport params={command=full-import} status=0 QTime=4
                  Jul 13, 2011 1:19:48 PM org.apache.solr.handler.dataimport.DataImporter doFullImport
                  INFO: Starting Full Import
                  Jul 13, 2011 1:19:48 PM org.apache.solr.handler.dataimport.SolrWriter readIndexerProperties
                  INFO: Read dataimport.properties
                  Jul 13, 2011 1:19:48 PM org.apache.solr.update.DirectUpdateHandler2 deleteAll
                  INFO: [] REMOVING ALL DOCUMENTS FROM INDEX
                  Jul 13, 2011 1:19:48 PM org.apache.solr.core.SolrDeletionPolicy onInit
                  INFO: SolrDeletionPolicy.onInit: commits:num=1
                          commit{dir=/home/ec2-user/public_html/solr/example/solr/data/index,segFN=segments_2,version=1310405039852,generation=2,filenames=[_0.tis, _0.nrm, _0.fnm, _0.tii, _0.frq, segments_2, _0.fdx, _0.fdt]
                  Jul 13, 2011 1:19:48 PM org.apache.solr.core.SolrDeletionPolicy updateCommits
                  INFO: newest commit = 1310405039852
                  Jul 13, 2011 1:19:48 PM org.apache.solr.handler.dataimport.JdbcDataSource$1 call
                  INFO: Creating a connection for entity gamelydb with URL: jdbc:mysql://www.gamely.us/gamelydb
                  Jul 13, 2011 1:19:49 PM org.apache.solr.handler.dataimport.JdbcDataSource$1 call
                  INFO: Time taken for getConnection(): 667
                  Jul 13, 2011 1:19:49 PM org.apache.solr.handler.dataimport.DocBuilder finish
                  INFO: Import completed successfully
                  Jul 13, 2011 1:19:49 PM org.apache.solr.update.DirectUpdateHandler2 commit
                  INFO: start commit(optimize=true,waitFlush=false,waitSearcher=true,expungeDeletes=false)
                  Jul 13, 2011 1:19:49 PM org.apache.solr.core.SolrDeletionPolicy onCommit
                  INFO: SolrDeletionPolicy.onCommit: commits:num=2
                          commit{dir=/home/ec2-user/public_html/solr/example/solr/data/index,segFN=segments_2,version=1310405039852,generation=2,filenames=[_0.tis, _0.nrm, _0.fnm, _0.tii, _0.frq, segments_2, _0.fdx, _0.fdt]
                          commit{dir=/home/ec2-user/public_html/solr/example/solr/data/index,segFN=segments_3,version=1310405039855,generation=3,filenames=[_1.fdx, _1.tis, _1.frq, _1.fdt, _1.tii, _1.fnm, _1.nrm, segments_3]
                  Jul 13, 2011 1:19:49 PM org.apache.solr.core.SolrDeletionPolicy updateCommits
                  INFO: newest commit = 1310405039855
                  Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher <init>
                  INFO: Opening Searcher@1c4795e main
                  Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm
                  INFO: autowarming Searcher@1c4795e main from Searcher@1d38b87 main
                          fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                  Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm
                  INFO: autowarming result for Searcher@1c4795e main
                          fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                  Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm
                  INFO: autowarming Searcher@1c4795e main from Searcher@1d38b87 main
                          filterCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                  Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm
                  INFO: autowarming result for Searcher@1c4795e main
                          filterCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                  Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm
                  INFO: autowarming Searcher@1c4795e main from Searcher@1d38b87 main
                          queryResultCache{lookups=0,hits=0,hitratio=0.00,inserts=1,evictions=0,size=1,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                  Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm
                  INFO: autowarming result for Searcher@1c4795e main
                          queryResultCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                  Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm
                  INFO: autowarming Searcher@1c4795e main from Searcher@1d38b87 main
                          documentCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                  Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm
                  INFO: autowarming result for Searcher@1c4795e main
                          documentCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                  Jul 13, 2011 1:19:49 PM org.apache.solr.core.QuerySenderListener newSearcher
                  INFO: QuerySenderListener sending requests to Searcher@1c4795e main
                  Jul 13, 2011 1:19:49 PM org.apache.solr.core.QuerySenderListener newSearcher
                  INFO: QuerySenderListener done.
                  Jul 13, 2011 1:19:49 PM org.apache.solr.update.DirectUpdateHandler2 commit
                  INFO: end_commit_flush
                  Jul 13, 2011 1:19:49 PM org.apache.solr.core.SolrCore registerSearcher
                  INFO: [] Registered new searcher Searcher@1c4795e main
                  Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher close
                  INFO: Closing Searcher@1d38b87 main
                          fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                          filterCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                          queryResultCache{lookups=0,hits=0,hitratio=0.00,inserts=1,evictions=0,size=1,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                          documentCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
                  Jul 13, 2011 1:19:49 PM org.apache.solr.handler.dataimport.SolrWriter readIndexerProperties
                  INFO: Read dataimport.properties
                  Jul 13, 2011 1:19:49 PM org.apache.solr.handler.dataimport.SolrWriter persist
                  INFO: Wrote last indexed time to /home/ec2-user/public_html/solr/example/solr/./conf/dataimport.properties
                  Jul 13, 2011 1:19:49 PM org.apache.solr.update.processor.LogUpdateProcessor finish
                  INFO: {deleteByQuery=*:*,add=[9, 10, 11, 12, 13, 14],optimize=} 0 4
                  Jul 13, 2011 1:19:49 PM org.apache.solr.handler.dataimport.DocBuilder execute
                  INFO: Time taken = 0:0:1.66
                  

                  如果您发现这里的某些内容无法投票,请告诉我,以便我可以修复它.

                  If you find something on here that's downvotable, please just let me know so I can fix it.

                  推荐答案

                  我认为问题出在 url 参数上.如果 MySQL 数据库在同一台机器上,则使用 url="jdbc:mysql://localhost/mydb"如果它在 www.mysite.com 上,则使用 url="jdbc:mysql://www.mysite.com/mydb"

                  I think the problem is with the url parameter. If the MySQL database is on the same machine, then use url="jdbc:mysql://localhost/mydb" If its on www.mysite.com, then use url="jdbc:mysql://www.mysite.com/mydb"

                  此外,您的日志文件可能包含有关错误的更多详细信息 - 请仔细阅读日志并在此处发布相应的条目.

                  Also, your log files may have more details regarding the error - please go through the logs and post the appropriate entries here.

                  这篇关于SOLR 数据导入错误“无法执行查询"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:用逗号分隔值的 Solr Facet 多个单词 下一篇:何时考虑 Solr

                  相关文章

                • <small id='e9Aqe'></small><noframes id='e9Aqe'>

                • <i id='e9Aqe'><tr id='e9Aqe'><dt id='e9Aqe'><q id='e9Aqe'><span id='e9Aqe'><b id='e9Aqe'><form id='e9Aqe'><ins id='e9Aqe'></ins><ul id='e9Aqe'></ul><sub id='e9Aqe'></sub></form><legend id='e9Aqe'></legend><bdo id='e9Aqe'><pre id='e9Aqe'><center id='e9Aqe'></center></pre></bdo></b><th id='e9Aqe'></th></span></q></dt></tr></i><div id='e9Aqe'><tfoot id='e9Aqe'></tfoot><dl id='e9Aqe'><fieldset id='e9Aqe'></fieldset></dl></div>
                • <tfoot id='e9Aqe'></tfoot>

                    <bdo id='e9Aqe'></bdo><ul id='e9Aqe'></ul>
                  <legend id='e9Aqe'><style id='e9Aqe'><dir id='e9Aqe'><q id='e9Aqe'></q></dir></style></legend>