
// sort the results by rank
foreach($this->searchResults as $key => $row) {
$rank[$key] = $row['rank'];
}
array_multisort($rank,SORT_DESC,$this->searchResults); // sort the results by rank
$i = 0;
foreach($this->searchResults as $key => $row) {
$rank[$key] = $row['rank'];
$ascOrder[$key] = $i++;
}
array_multisort($rank, SORT_DESC, $ascOrder, SORT_ASC, $this->searchResults);
&order=`publishedon DESC` &rank=`pagetitle:100,extract` &order=`publishedon DESC` &rank=`pagetitle:100,longtitle:100,alias:100,extract` &order=`publishedon DESC` &rank=`pagetitle:100,longtitle:100,alias:100,extract:0`
Searching a word with or without first capital letter ever finds all results with this word, e.g. searching "Berlin" or "berlin" gives back same results.Which version of the Search_Highlight plugin do you use ? I can’t reproduce this issue. See this thread.
But: the highlighting span in extracts marks only the version typed in search form. Searching "berlin" marks only "berlin" in the results list but additionally shows all other results with unmarked "Berlin". Is there a way to adapt the search class marking both versions found and extracted?
Now I triedI have done the following tests - Try Education as searchTerm :
Code:
&order=`publishedon DESC` &rank=`pagetitle:100,extract`
&order=`publishedon DESC` &rank=`pagetitle:100,longtitle:100,alias:100,extract`
&order=`publishedon DESC` &rank=`pagetitle:100,longtitle:100,alias:100,extract:0`
For all versions the results are same pages in same order.
[+as.rankShow:is=`1`:then=` <br /><span class="[+as.rankClass+]"><strong>Rank:</strong> [+as.rank+]</span><br /><br /> `+]
Great work coroico! Keep calm with this issue.
In the version 1.8.1 currently in progress, the &whereSearch parameter is improved by adding the list of fields where to do the search
e.g: &whereSearch=`content:pagetitle,introtext|tv:tv_value|maxigallery:gal_title`
by default by default = "content|tv" allow the search in all the fields of content and tv values.
and the list of Tvs used by the search defined by the &withTvs parameter.
e.g: &withTvs=`+:tv1,tv5,tv8` use only tv1,tv5,tv8 for the search (&whereSearch)
e.g: &withTvs=`-:tv1,tv5,tv8` all tvs except tv1, tv5,tv8 are used
I’m using version 1.8.3
And in any case, all the data fields of the tables used will be available as placeholder for the display in templates.
[EDIT: Registered as ADDON-24]

&whereSearch=`content:NULL|tv` &withTvs=`+:tvTage1,tvTag2`