how to use Sphinx for two different searches

Yuri Boyz
Yuri Boyz used Ask the Experts™
on
In my website, I have integrated search which uses Sphinx at backend. Everything works
fine. You can say it as a Main Search

Now I want to add another search for NEWS module only. You can say it a mini search. This
search only search records within NEWS page, whereas the

main search(mentioned above) is searching the content in all cms pages.

For my main search I have SPHINX folder on the root of my drive which has one source and
one index. Here is the content of my .conf file.

source drupal_search
{
                type = mysql
                sql_host = localhost
                sql_user = root
                sql_pass =
                sql_db = sc
                sql_port = 3306
              sql_query = select n.nid as ID, n.title, n.status, n.created, f.field_body_value ,
              f.bundle\ from node n \ inner join field_data_field_body f on (n.nid = f.entity_id)\
              where n.status = 1\ ;

              sql_attr_timestamp = created
              sql_attr_uint = status
              sql_field_string = bundle
              sql_attr_string = type
              sql_query_pre = SET NAMES utf8

}

index drupal_search
{
        source = drupal_search
                path = C:\sphinx5\data\drupal_search
        docinfo = extern
        charset_type = utf-8
}

Open in new window


Now what is the best approach to add secondaRY SEARCHnews for NEWS Module.
Can I make another .conf file?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial