Closed (fixed)
Project:
Apache Solr Search
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2009 at 22:39 UTC
Updated:
8 May 2009 at 18:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
Scott Reynolds commentedWith the views query class there are four stages that happen. init, build, alter, execute. I think that lends itself to a very nice flow.
Comment #2
pwolanin commentedhere's a start on more complete handling of negative queries by parsing the leading '-' and taking it as a separate param for make_filter()
(my favorite kind of patch - more lines removed than added)
Comment #3
pwolanin commentedidea fmor Damien: http://drupalbin.com/8844
Comment #4
Scott Reynolds commentedshouldn't there be a build() method does all that code (variable_gets() etc) instead of making the hook_search() unreadable. That would be preferable.
Comment #5
pwolanin commented@Scott - no, I don't think most of that should be in the class itself - for example, the mlt module does not use or need most of this setup.
However, that current is certainly a monster that should be broken up a bit.
Comment #6
Scott Reynolds commentedahh good point. Moving it to a separate function though would be a huge bonus. With localsolr and the Views implementation both basically copy and paste that code in there. If we could just call apachesolr_build_params() that would be advantageous
Comment #7
david lesieur commentedRegarding comments #4 to #6, #436792: Modular handling of params might be of interest.
Comment #8
Scott Reynolds commentedThey apachesolr_views project does something very similar to whats in this patch for handling negative filters.
Comment #9
pwolanin commentedok, I could even roll it as a boolean like:
if that abstraction is more useful.
Comment #10
pwolanin commentedComment #11
pwolanin commentedA couple more little fixes - committing to 6.x
note - without this the current search block is a bit broken for negative queries:
(-) [* TO *]since it's looking for a function using a name containing '-'.