Apachesolr drupal 方面断为多行
我在 drupal 中使用 apachesolr 模块
我创建了一个自定义构面字段主题,但在drupal构面块中,该句子在多行/结果中中断
例如科目分析化学将是
我有表journal、subject、subject_journal 和article
我的数据配置文件有实体
<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>
请帮忙
谢谢
I am using apachesolr module in drupal
I have created a custom facet field subject but in drupal facet block, the sentence is breaking in multiple line/result
for example the subject Analytical chemistry would be<int name="analyt">1</int>
<int name="chemistri">1</int>
I have tables journal, subject, subject_journal and article
My data config file has entity
<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>
Please help
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您似乎正在对您的方面领域进行分析。
一般分面字段详细信息 -
分面字段通常指定用于两个目的,即人类可读的文本和深入查询值,它们的索引通常与用于搜索和排序的字段不同:
它们通常不会标记为单独的单词
它们通常不会映射为小写字母
人类可读的标点符号通常不会被删除(双引号除外)
通常不需要存储它们,因为存储的值看起来很像索引值,并且分面机制用于值检索。
您应该为构面字段维护一个单独的副本,并且不对它执行任何分析,并将其用作构面字段。
you seem to be performing analysis on your facet field.
General facet field detail -
Faceting fields are often specified to serve two purposes, human-readable text and drill-down query value, they are frequently indexed differently from fields used for searching and sorting:
They are often not tokenized into separate words
They are often not mapped into lower case
Human-readable punctuation is often not removed (other than double-quotes)
There is often no need to store them, since stored values would look much like indexed values and the faceting mechanism is used for value retrieval.
you should maintain a seperate copy for the facet field and perform no analysis on it, and use that as the facet field.