[development] Multiple search blocks doing different searches.

Ronan Berder berder at teddy.fr
Fri Feb 12 00:26:20 UTC 2010


Well Anth, you're wrong. What the "Search: Search Terms" filter does is
precisely using the search index as a filter, which allows you to run the
same kind of keyword based searches as you would do with the default search
block. Expose it and add a non-exposed filter for each location and you
should be good to go.

On Tue, Feb 9, 2010 at 12:47 PM, Anth <malkouna at yahoo.com.au> wrote:

> Well I want to use the indexed search that is already available, but have
> several variations of the search (8 to be exact, one for every Australian
> state and one "National" one which would be the base unmodified search).
>  For this reason I don't think it's views that I want as, and correct me if
> I'm wrong, but the views exposed filters work only on the column that the
> filter is defined for?
>
> I get the feeling that I'm going to have to write 8 separate forms and call
> the current search functions in each one, modifying the SQL each time.
>  Which is fine, just thought there might be a smarter way to do it.
>
> A.
>
>  Date: Mon, 8 Feb 2010 19:51:24 +0800
>> From: Ronan Berder<berder at teddy.fr>
>> Subject: Re: [development] Multiple search blocks doing different
>>        searches.
>>
>>
>> The question would be; what is it exactly that you are trying to search?
>> If
>> you just want a few separate search blocks that search within a certain
>> content type, you may find interesting defining a View for it, creating
>> several displays for each content type you wish to be searchable and
>> exposing the "Search: Search Terms" filter. You then can set up the
>> "Exposed
>> form in block: " setting to true (in "Basic Settings") and you should then
>> have the search forms showing in separate blocks. You can then compose by
>> adding filters or exposed filters your own way (on content types, taxonomy
>> or whatever you wish to let user search by or within).
>>
>> On Mon, Feb 8, 2010 at 12:48 AM, Anth<malkouna at yahoo.com.au>  wrote:
>>
>>
>>
>>> Hi,
>>>
>>> My goal is to set up a tabbed search block which I'll use Quick Tabs to
>>> build, where each tab will prime the search with a keyword.  The step
>>> before
>>> this though is to have multiple blocks that do slightly different
>>> searches.
>>>  Defining the blocks is easy enough but I can't use hook_db_rewrite_sql
>>> (an
>>> example from searching at [1]) as I don't know what block is calling it.
>>>  Is
>>> there some easy way or trick around this or do I just have to manually
>>> call
>>> do_search, or write my own search, for each block?
>>>
>>> Thanks,
>>> Anthony
>>>
>>> [1]
>>> http://www.lullabot.com/articles/hiding-content-drupals-search-system
>>>
>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100212/652a1616/attachment.html 


More information about the development mailing list