Drupal 6 Apachesolr drupal刻面在多行中断开

Drupal 6 Apachesolr drupal刻面在多行中断开,drupal-6,solr,facets,Drupal 6,Solr,Facets,我正在drupal中使用apachesolr模块 我已经创建了一个自定义方面字段subject,但是在drupal方面块中,句子在多行/结果中被打断 例如,科目分析化学将是 1 1 我有期刊、主题、主题期刊和文章表 我的数据配置文件具有实体 <entity name="subject" pk="id" query="select s.id, s.title from subject s join

我正在drupal中使用apachesolr模块
我已经创建了一个自定义方面字段subject,但是在drupal方面块中,句子在多行/结果中被打断
例如,科目分析化学将是
1
1

我有期刊、主题、主题期刊和文章表
我的数据配置文件具有实体

<entity name="subject" pk="id"
                    query="select s.id, s.title from subject s
                            join subject_journal sj on sj.subject_id = s.id
                            join article a on a.journal_id = sj.journal_id
                            where sj.journal_id = '${article.journal_id}' 
                            group by s.id, s.title">
                    <field column="id" name="subject_id" /> 
                    <field column="title" name="subject" />                         
        </entity>

请帮忙

谢谢

您似乎正在对您的方面字段执行分析

<field name="subject" type="text_general" indexed="true" stored="true" multiValued="true"/>
<!-- Maintain different facet field -->
<field name="subject_facet" type="string" indexed="true" stored="true" multiValued="true"/>

<!-- copy field -->
<copyField source="subject" dest="subject_facet"/>
一般分面字段详细信息-

刻面字段通常用于两个目的,即人类可读文本和深入查询值,它们的索引通常与用于搜索和排序的字段不同:

它们通常不被标记为单独的单词 它们通常不映射为小写 人类可读的标点符号通常不会被删除(双引号除外) 通常不需要存储它们,因为存储的值看起来很像索引值,而刻面机制用于值检索

您应该为facet字段维护一个单独的副本,不对其执行分析,并将其用作facet字段

<field name="subject" type="text_general" indexed="true" stored="true" multiValued="true"/>
<!-- Maintain different facet field -->
<field name="subject_facet" type="string" indexed="true" stored="true" multiValued="true"/>

<!-- copy field -->
<copyField source="subject" dest="subject_facet"/>


感谢patel,我有其他实体,它们的刻面工作良好,我没有使用您在上面指定的方法,如日志刻面。如果您使用文本作为字段类型,并且字段有多个单词或生成标记,则会出现此问题。对于facet,您需要字符串作为字段类型。顺便说一句,它的Patil而不是patethank它的工作方式我已经将类型从文本更改为字符串,但我必须通过&facet=true,尽管它在配置中已经是真的,如果我没有在搜索url中指定&facet=true,它会显示拼写错误的主题任何想法我都必须通过,但如果通过,这将显示带有拼写错误我不太确定这一个。如果未传递facet=true,则不会返回任何facet响应。