论坛首页 Java企业应用论坛

Solr4.10 dataimport后搜索出的字段不全

浏览 4665 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2014-10-01  
我用solr4.10的dataimport把postgreSQL一个表的数据导到solr后,再用查询,结果只能查出两个字段,其它的字段都查不出内容来。

如下配置:
<?xml version="1.0" encoding="UTF-8" ?>

<dataConfig>
  <dataSource type="JdbcDataSource"
              driver="org.postgresql.ds.PGSimpleDataSource"
              url="jdbc:postgresql://localhost:5432/mydata"
              user="usr"
              password="psswd"/>
    <document>
          <entity name="topic" query="SELECT * FROM topic ORDER BY id">
              <field column="id"             name="id" />
              <field column="subject_id"        name="subject_id" />
              <field column="author"       name="author" />
              <field column="time_create" name="time_create" />
              <field column="topic_create"    name="topic_create" />
              <field column="time_edit"             name="time_edit" />
              <field column="topic_edit"        name="topic_edit" />
              <field column="topic_type"       name="topic_type" />
              <field column="last_content_time" name="last_content_time" />
              <field column="last_content_author"    name="last_content_author" />
              <field column="floors"        name="floors" />
              <field column="browses"       name="browses" />

              <fields>  
                  <field name="_version_" type="long" indexed="true" stored="true"/>
                  <field name="id" type="long" indexed="true" stored="true"/>
                  <field name="subject_id" type="text_general" indexed="true" stored="true"/>               
                  <field name="author" type="text_general" indexed="true" stored="true"/>
                  <field name="time_create" type="text_general" indexed="true" stored="true"/>
                  <field name="topic_create" type="text_general" indexed="true" stored="true"/>
                  <field name="time_edit" type="text_general" indexed="true" stored="true"/>               
                  <field name="topic_edit" type="text_general" indexed="true" stored="true"/>
                  <field name="topic_type" type="text_general" indexed="true" stored="true"/>
                  <field name="last_content_time" type="text_general" indexed="true" stored="true"/>               
                  <field name="last_content_author" type="text_general" indexed="true" stored="true"/>
                  <field name="floors" type="text_general" indexed="true" stored="true"/>
                  <field name="browses" type="text_general" indexed="true" stored="true"/>
              </fields>
          </entity>
    </document>

</dataConfig>

postgreSQL的topic表中有id,subject_id,author...browses共12个字段,导出solr后,query查询啊能搜出id和author两个字段的数据,另外的十个字段的数据都搜不出来,不知怎么回事?
   发表时间:2015-01-11  
我也遇到这个问题了。朋友,你查出是什么原因了吗?
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics