Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I wanted to clarify if I am doing something wrong or there is a malfunction:
When search terms exposed filter is searched with 1 word, it gives results. When searched with 2 keywords, it does not.
Is there any way to correct this ? I didn't see any place for configuration. I assume it should give results normally as using the same data as search module, which works in this case as expected.
I am using the default taxonomy_term view that comes with View 2 module, which has 2 arguments and 2 sorting criteria, in case any of these are causing malfunction ??? Can this be confirmed ?
Thanks
Comment | File | Size | Author |
---|---|---|---|
#19 | 373760-fix-aggregate.patch | 2.2 KB | merlinofchaos |
Comments
Comment #1
cincy_kid CreditAttribution: cincy_kid commentedI am having a similar problem.
In my views, when using filters, if its a one word term like "casual" it works fine but anytime its more than word, like "business casual" not only does it not work but it gives me 2 SQL errors pointing to:
/modules/views/includes/view.inc on line 697
and
/modules/views/includes/view.inc on line 723
which both look like they have to do with the results (maybe with the count or pager i dunno).
I have 3 different views that all work the exact way (fine with 1 word terms and these 2 SQL errors on 2+ words)
Do you also get a SQL error on yours sbydrupal?
Comment #2
sbydrupal CreditAttribution: sbydrupal commentedCincy, in my case, there is no sql error, however, it does not show any results with multiple words.
I have seen some other posts with similar results where views search term filter misses some searches where the core drupal search picks up.
Comment #3
cincy_kid CreditAttribution: cincy_kid commentedweird..ok, I still think it will help solve my problem when we figure out why 2+ words are not working in views exposed filters
Comment #4
wOOge CreditAttribution: wOOge commentedI'm having the same issue.
As an example I'm able to bring up results using "apple" or "pie", but not "apple pie". I don't get any SQL erros in the drupal log-watch though.
I re-indexed my site completely, including removing and uninstalling (deleting the search index tables) and re-enabling the Search module, but no luck.
Drupal 6.9
Views 6.x-2.3
Comment #5
David_Rothstein CreditAttribution: David_Rothstein commentedI tried to reproduce this problem and couldn't -- the Views Search worked correctly for me regardless of whether I tried a single or multiple word search...
Maybe someone who is experiencing this could attach an export of a view for which the problem occurs?
Comment #6
DamienMcKennaHere's a sample query produced by Live Preview when I am querying for two different terms:
FYI, the term_nide.tid list are parent terms, 'caribbean atlantic' is a child term of tid=1.
Comment #7
DamienMcKennaThis is the same problem as #301159: using two taxonomies for filtering.
Comment #8
wOOge CreditAttribution: wOOge commentedHere is my Views2 Export:
And here is the query it produces:
Comment #9
merlinofchaos CreditAttribution: merlinofchaos commentedFor those that are having this problem, what version of MySQL (or pgsql) are you using?
Comment #10
DamienMcKennaMySQL v5.0.51a
Comment #11
DamienMcKennaClarification: issue 301159 is related but not necessarily the same.
Comment #12
cincy_kid CreditAttribution: cincy_kid commentedMYSQL DB 5.0.67
Also to clarify, the problem occurs when its 2 words inside the same filter box, not just because I am using multiple filters.
So, if I have 2 filters (color and weight) consider these 2 examples:
1) If I select "Blue" in the first exposed filter and "Heavy" in the second exposed filter it returns results just fine.
2) If I select "Light Brown" in the first exposed filter and "Heavy" in the second exposed filter I get no results plus the SQL error I posted above because Light Brown has a space in between it and is 2 words instead of one.
Comment #13
wOOge CreditAttribution: wOOge commentedI'm using MySQL v5.1.30
Comment #14
brooho CreditAttribution: brooho commentedI upgraded mysql to 5.0.77 but problem still remains
and I think I understand
my view ( http://drupal.org/node/373390 ) produced query:
but score is different for 'philips' and for '444' and it is not groupped
AND it is hard to reproduce becouse sometime it work correctly (when score equals)
Comment #15
wOOge CreditAttribution: wOOge commentedIf I remove HAVING COUNT(*) >= 2 from my original MySQL Query below, it works - I get the right results at the top of the list, but it spews out all nodes after that.
Comment #16
merlinofchaos CreditAttribution: merlinofchaos commentedAh! Blast it I see, that score is a calculation and should NOT be part of the group by. That makes a lot of sense. Thank you for the clarification. I still don't know why this behavior changed.
Comment #17
wOOge CreditAttribution: wOOge commentedThanks for looking into this for us!!
Comment #18
brooho CreditAttribution: brooho commentedYes, thank you, merlinofchaos :)
Comment #19
merlinofchaos CreditAttribution: merlinofchaos commentedPlease tell me if this patch fixes the problem for you.
Comment #20
dwwNow that the issue adv search pages are views, this is potentially nailing us on d.o, too. I'll try to test this in a little while, dealing with a lot of things right now....
Comment #21
mshaver CreditAttribution: mshaver commentedPatch worked for me!
Comment #22
merlinofchaos CreditAttribution: merlinofchaos commentedhttp://drupal.org/node/362830 points out other things broken with search, and fixing them led to a bit of a renovation. Even though this is not technically a dup, I'm marking it such because the patch there includes this patch and they are not separable.
Comment #23
wOOge CreditAttribution: wOOge commentedYup this patch worked for me too!
Thanks!!
Comment #24
brooho CreditAttribution: brooho commentedYes, it works!
Comment #25
sjf CreditAttribution: sjf commentedI'm still having this problem with Views 6.x-3.x-dev. e.g. I have several nodes with the same taxonomy term "light brown". I have a Views page with a single search filter.
It does seem to be a bit random. For example, I might have two nodes with the term "light green" and if I search "light green" I might get one result back. Searching "light" or "green" would return both. I can't figure out the pattern.
I've tried this on two sites on two different servers and I have the same problem so I think the issue is still here. I only have details of one server to hand - PHP 5.2.9 and MySQL 5.0.81
Views 6.x-2.6 and 6.x-2.x-dev work perfectly. I'm setting this issue back to active as I don't know if updating the patch mentioned in #22 is still the fix.
Comment #26
FreddieK CreditAttribution: FreddieK commentedI'm experiencing the same or a similar problem. When filtering for event nodes I can use taxonomy terms such as 'theatre' or 'dancing' separately, but written as 'theatre dancing' results in no nodes found. If I instead write them as 'theatre, dancing' results for both of the terms are found (which is the desired result), but why does the comma have to be there? For new users of a site search function it's kinda' counter-intuitive.
Comment #27
dawehnerPlease create new issues for new problems related to 3.x