I've searched all over the forums and date base of modules, but nothing worked, so I need your help.

The thing I want to do is:
When I created CCK fields, the data from it to be indexed in the search engine.
After I go to advanced search, there need to be a field, that search exactly and only into that CKK fields.

For example,

I have a archive of magazine, and I have 3 CCK fields - Author, Rubric and Publisher.

When I go to the advanced search, when i search for a publisher, it need to search only for the CKK fields of the publisher (Not in all CKK fields).

I'll really appreciate your help.

Thank you in advance.

Comments

I'm in similar situation, I

I'm in similar situation, I want search in specific cck fields but using views, I've installed views_fastsearch which provides a custom field for search in indexed content. But it seems that content is not indexed well...

Will provide feedback if found some solution.

--
(3 John 1:2) Dear friend, I pray that you may enjoy good health and that all may go well with you, even as your soul is getting along well.

--
Dear friend, I pray that you may enjoy good health and that all may go well with you, even as your soul is getting along well (3 John 1:2)

+1

Same here.
We can always use filters in views but it would be nice to have such a thing on drupal's search.

Me too!!!

I'm looking for this too........

Try Field Indexer module ...

Try Field Indexer module ... it allows you to include CCK fields in drupal search.

I'm using D6

Thanks for your reply but i'm using D6.8.

I think Field Indexer not

I think Field Indexer not helpfull to this case, i've try it but nothing changed in Advance Search page...

Search Adjustment

i did find a way to use cck fields on the node search, i need to adjust the search form (will redirect the current search page to one of mine), but manage to adjust the node_search function to accept cck fields, this is my current tests and adjustments:

i have a "field_channel" cck field for the blog content type, so this is what i have done:

did copy the node_search function on /modules/node/node.module to a different file for testing (renaming the function to my_node_seach), you can adjust the core file if you want

and did add the next code (on the "Build matching conditions" section, you will notice that there is currently 2 conditions, type and category, you just need to add as many as you need) example ():

<?php
#function my_node_seach(....
#....
 
if ($channel = search_query_extract($keys, 'channel')) {
   
$channels = array();
    foreach (
explode(',', $channel) as $c) {
     
$channels[] = "ctb.field_channel_value = %d";
     
$arguments1[] = $c;
    }
   
$conditions1 .= ' AND ('. implode(' OR ', $channels) .')';
   
$join1 .= ' INNER JOIN {content_type_blog} ctb ON n.nid = ctb.nid';
   
$keys = search_query_insert($keys, 'channel');
  }
#....
?>

i have done some tests on a single php file with (search blogs with the word 'test' and with the channel id 25):

<?php
 
include_once './includes/bootstrap.inc';
  include_once
'./misc.php'; # my testing functions file on where the my_node_search function is
 
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
 
$keywords = 'test type:blog channel:25';
 
$data = my_node_search('search', $keywords);

  echo
'<pre>'; print_r($data); echo '</pre>';
?>

so my next step will be adjusting the action on the general search form, create my own search page to catch the new fields that im adding to the search, etc

Subscribing...

Subscribing...