Hello.
This is a core API question.
In Drupal 7 (and maybe also in 6), a url like this:
"http://somehost/search/node/anykeyword%20type:page%20term:5,1"
will return any node of type 'page' that contains the keyword 'anykeyword' and having taxonomy term 5 OR taxonomy term 1.
I tried to work around this narrowing the results to pages that only having term 5 and term 1 at the same time.
I made the following two changes:
1. In the 'node.module' file at line 1649, I altered 'setOption' function to setOption2, i.e., created new setOption function that will be associated to the taxonomy portion of the search.
2. In the file 'search.extender.inc' at line 169 after the orriginal setOption function I created setOption2, it is the same as setOption but instead of using db_or() i used db_and(). the new function body is shown below.
public function setOption2($option, $column) {
if ($values = search_expression_extract($this->searchExpression, $option)) {
$and = db_and();
foreach (explode(',', $values) as $value) {
$and->condition($column, $value);
}
$this->condition($and);
$this->searchExpression = search_expression_insert($this->searchExpression, $option);
return TRUE;
}
return FALSE;
}
i expect everything to go well but it doesn't work!