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
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.