Active
Project:
Apache Solr Search
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2011 at 18:18 UTC
Updated:
28 Mar 2011 at 18:48 UTC
This was originally brought up here: http://drupal.org/node/1080652#comment-4214808
Essentially a fallback search should have access to the same query arguments that existed for the original solr search.
Comments
Comment #1
elliotttf commentedMy biggest concern with doing this is cases where query arguments might be undesirable if they're passed on. Consider the case where solr fails on page 5. What if the fallback search doesn't have a page 5 of results? Or what if the filters argument means something different on the fallback search?
Comment #2
pwolanin commentedWell, those are certainly possible problems - but if e.g. the ?keys= format is being used for keywords, the current redirect won't work, right?
Comment #3
elliotttf commentedThat's correct. Is there a case where apachesolr would be using the keys argument though? From search_view():
So if the apachesolr module isn't using the "old GET format of searches" I don't think we necessarily need to capture that value on failure.
In order to attempt to support older searches, we could pass the keys variable along as a $_GET argument... i.e.:
Comment #4
pwolanin commentedThat would send the keys twice - that's backward to what I was suggesting.
Comment #5
elliotttf commentedMy comment in #3 was incorrect. If $_GET['keys'] was being used against solr the core search module would translate that query argument to normal keys and would be correctly accessible in apachesolr_failure().
The only time we'd need to be concerned about keys is if the fallback search didn't support non keys query argument searches. I'm not sure handling this edge case in apachesolr is desirable since most fallback searches would work correctly with the normal search/SEARCH_PATH/SEARCH_KEYS method of searching.
If we remove keys from the list of query arguments we're interested in I think the original problems I raised in #1 are the biggest things we need to address before coding anything.