Hi,
The filters 1 to 8 are those by default from ditto.
I’ve added my own 9 and 10.
9=> works like the "onlytags" if the tv contains at least 1 of the selected value.
10 => hard to explain, ;-)
Here is a little explanation about filters in tvexplorer
TV1: Appellation (checkbox)
options values: Bordeaux, Côtes du Rhône, Bourgogne, Chateauneuf du pape
TV2: Couleur (listbox-Multiple)
options values: Rouge, Rosé, Blanc.
TV3: Categorie(select)
options values: Vin de Pays, Vin AOC, Grand crû.
If we are seraching wines with ChateauNeuf du Pape (AND) Rouge,(AND) Grand crû
Filters will be:
F1 : &filter:tvAppellation,ChateauNeuf du Pape,7|tvCouleur,Rouge,7|&Categorie,Grand crû,7
ou
F2 :&filter:tvAppellation,ChateauNeuf du Pape,1|tvCouleur,Rouge,1|&Categorie,Grand crû,1
in both case tagMode is "onlyTags"
Now we’d like to go further and search the wines:
ChateauNeuf du Pape OR Bourgogne (AND) Rouge OR Rosé (AND) Grand crû
Filters F1 et F2 won’t produce satisfying results
we’ll get wines from ChateauNeuf du Pape OR Bourgogne (OR) Rouge OU Rosé (AND) Grand crû
we find in the results listings :
bordeaux rouges grands crus, bordeaux rosés grands crus, Côtes du Rhône rosés grands crus et Côtes du Rhône rouges grands crus althought we were seraching only ChateauNeuf du pape OR Bourgogne.
tvExplorer will produce additionnal filters to insure a better results list.
To do so we will exclude from listings documents which have among their Tv values one of the unselected options
So filters will be
F1 : &filter:tvAppellation,ChateauNeuf du Pape,7|tvAppellation,Bourgogne,7|tvCouleur,Rouge,7|tvCouleur,Rosé,7|Categorie,Grand crû,7
OR
F2 : &filter:tvAppellation,ChateauNeuf du Pape,1|tvAppellation,Bourgogne,1|tvCouleur,Rouge,1|tvCouleur,Rosé,1|Categorie,Grand crû,1
+ filters tvExplorer
=> tvAppellation,Côtes du Rhone,2|tvAppellation,Bordeaux,2|tvCouleur,Blanc,2|Categorie,Vin AOC,2|Categorie,Vin de Pays,2|
we obtain the expected result:
Bourgogne wines OR Chateauneuf du pape AND Rouge OR Rosé AND Grand Crû
:-)
NOTE that all the filters are passed in an array to ditto