Closed (works as designed)
Project:
Views (for Drupal 7)
Version:
6.x-2.5
Component:
page displays
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 May 2009 at 16:40 UTC
Updated:
14 Dec 2010 at 15:36 UTC
Hello,
I have Views page that has a glossary attachment as well as an exposed search filter. Results from a search don't display as the usual cumulative record count with link within the glossary, rather each result generates a repeating glossary 'letter' with a single linked record. (see the attached picture for clarification)
Is there a way to correct this within Views that I'm missing?
I've attached the query below:
SELECT node.nid AS nid,
SUM(search_index.score * search_total.count) AS score,
node.title AS node_title,
node_data_field_tradename.field_tradename_value AS node_data_field_tradename_field_tradename_value,
node_data_field_tradename.delta AS node_data_field_tradename_delta,
node.type AS node_type,
node.vid AS node_vid,
node_data_field_class.field_class_value AS node_data_field_class_field_class_value,
node_data_field_class.delta AS node_data_field_class_delta,
node_data_field_atc.field_atc_value AS node_data_field_atc_field_atc_value,
node_data_field_atc.field_comments_value AS node_data_field_atc_field_comments_value,
node_data_field_atc.field_marketed_value AS node_data_field_atc_field_marketed_value,
node_data_field_atc.field_furtherinfo_value AS node_data_field_atc_field_furtherinfo_value,
node_data_field_atc.field_noc_value AS node_data_field_atc_field_noc_value,
node_data_field_atc.field_postupate_vname AS node_data_field_atc_field_postupate_vname,
node_data_field_atc.field_postupate_vargs AS node_data_field_atc_field_postupate_vargs,
node_data_field_atc.field_source_value AS node_data_field_atc_field_source_value
FROM node node
LEFT JOIN search_index search_index ON node.nid = search_index.sid
LEFT JOIN search_total search_total ON search_index.word = search_total.word
LEFT JOIN content_field_tradename node_data_field_tradename ON node.vid = node_data_field_tradename.vid
LEFT JOIN content_field_class node_data_field_class ON node.vid = node_data_field_class.vid
LEFT JOIN content_type_druglisting node_data_field_atc ON node.vid = node_data_field_atc.vid
WHERE (node.status <> 0) AND (node.type in ('druglisting')) AND (search_index.word = 'din') AND (search_index.type = 'node')
GROUP BY search_index.sid, node_title, nid, node_data_field_tradename_field_tradename_value, node_data_field_tradename_delta, node_type, node_vid, node_data_field_class_field_class_value, node_data_field_class_delta, node_data_field_atc_field_atc_value, node_data_field_atc_field_comments_value, node_data_field_atc_field_marketed_value, node_data_field_atc_field_furtherinfo_value, node_data_field_atc_field_noc_value, node_data_field_atc_field_postupate_vname, node_data_field_atc_field_postupate_vargs, node_data_field_atc_field_source_value
HAVING COUNT(*) >= 1
ORDER BY node_title ASC
Any help would be greatly appreciated, thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| searchresults.jpg | 48.65 KB | dleong |
Comments
Comment #1
dleong commentedSorry for the bump...but I still can't figure out how to group the search results together so that the glossary letters are not repeating for each result. I'm not much of a programmer unfortunately and have just recently started using this great CMS.
Thanks in advance for any suggestions.
Dennis
Comment #2
dawehnerI fear that search together with glossary is to hard to be done right.
Additional this might kills your site performance because you get a lot of different items from the search. You could use apachesolr/searchlight for such advanced stuff perhaps.
I know this is not really a fix.
Comment #3
Letharion commented@dleong
This issue is now for rather old version of Views. If you still have problems, please
1) try with a more recent version and
2) export a feature with your View and data
so that the problem can be reproduced.
Or if performance will matter to you, consider taking dereine's advice and look at solr.
Comment #4
esmerel commented