Complex search queries (and/or/negative), and searches queries without a valid keyword, fail with a SQL error and PHP notice. There was a typo in a table name, and some apparently non-functional code re: views_join_search_dataset that I simply got rid of (since I couldn't find a use for it). And I added logic to detect the case where the array of keywords is empty (e.g. only negative or too-short keywords).

CommentFileSizeAuthor
#2 views-search.patch3 KBmfb
views-search.patch2.55 KBmfb

Comments

mfb’s picture

Status: Needs review » Needs work

I think I realize why the join class is needed so I will have to reroll this.

mfb’s picture

Status: Needs work » Needs review
StatusFileSize
new3 KB

Ok this fixes the join rules for search_dataset.

merlinofchaos’s picture

Spiffy.

I admit I don't really understand the search stuff (mostly a limitation of time; I haven't wanted to take the time to really understand it, and it's not completely straightforward so just reading it isn't enough), so the views integration of it is kind of opaque to me. So I can't review this very easily. This'll go in anyway, though I'd love it if there's at least one other person who pretends to understand how this works.

mfb’s picture

Well if I put down the silly programming books that are usually a waste of time anyways and read thru all the search and views module code.. I could at least "pretend" to understand it all :) I am putting this on my list of things to do whilst on public transportation.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed! What the heck. =)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.