I spent some time getting the guided search portion working with MSSQL. I haven't tested any other parts of this module, so there still may be work needed. Some aspects of the code made it very difficult for me to port this "properly" (i.e., avoid using MSSQL switch/case statements vs. rewriting the queries to work universally). One of the big issues concerned aliasing. For columns that were simple calculations (e.g., for the score), aliasing makes sense, but for columns that are already unique like term_data.tid, there isn't any reason to alias it to term_data_tid is there???. What I basically did was prevent this since you can't GROUP BY aliased columns in MSSQL. Now, this may very well be a mistake on MSSQL's part, but I had to deal with it nonetheless. Do you think there is a way to adjust the queries used such that it's compatible with both/all databases?

CommentFileSizeAuthor
faceted_search_5.x-1.0-beta4_mssql.txt8.98 KBpcorbett

Comments

David Lesieur’s picture

The aliases are needed to disambiguate references to fields, because there are cases where the same table is joined multiple times in the same query.

pcorbett’s picture

Okay, makes sense. I'll look into an alternate solution.