Can i restrict the pages that AjaxSearch searches?
Extract from ajaxSearch_readme.txt: To search in some documents:
---- &parents [ [ in | not in ] : comma separated list of Ids | '' ] (optional)
A list of parent-documents whose descendants you want searched to &depth depth when searching.
All parent-documents by default
e.g:
&parents=`in:24,25` - do the search in the children documents of documents 24 and 25
&parents=`not in:24,10` - do the search in all documents except in the children documents of documents 24 and 10 documents
&parents=`24,25` means &parents=`in:24,25` (compatible with the 1.8.4 release)
&depth [ 0 < int ] Number of levels deep to retrieve documents
---- &depth [int] (optional)
Number of levels deep to go.
Any number greater than or equal to 1. 10 levels by default
---- &documents [ [ in | not in ] : comma separated list of Ids | '' ] (optional)
A list of documents where to search
e.g:
&documents=`in:28,29,30,31` - do the search in the documents 28,29,30,31
&documents=`not in:28,29,30,31` - do the search in all documents except in documents 28,29,30,31
&documents=`28,29,30,31` means &documents=`in:28,29,30,31` (compatible with the 1.8.4 release)
To exclude some documents from the search:
---- &filter : exclude unwanted documents (optional)
&filter runs as the &filter Ditto 2.1 parameter.
(see http://ditto.modxcms.com/tutorials/basic_filtering.html)
&filter=`field,criterion,mode`
Where:
"field" is the name of any field from main table (site content) or joined table (jot, maxigallery) or a tv name
"criterion" is a value of the same data type (number, string, date, etc.) as the field.
"mode" is a number from 1 to 8 that specifies what kind of comparison to make
between the value of the field and the specified criterion.
"," (comma) is the "Local Filter Delimiter", i.e. the character that tells
where the division is between the three parts of the clause.
There must be no spaces in the "criteria" term unless you want them used in the comparison.
The filter clause: id,50,2 means "exclude any document whose id field equals 50."
The filter clause: articleTags,volcano,7 display only documents related to volcanoes (tv name = articleTags)
A filter may include multiple clauses, separated by the global delimiter, in the form: clause|clause|clause|etc.
Where:
"clause" is any filter clause as defined above.
"|" (the pipe symbol) is the Global Filter Delimite, the character that
tells Ditto where the division is between clauses.
"etc." means there is no fixed limit to the number of clauses you may include.
Multiple clauses have an "OR" relationship. I.e. a document will be excluded
if it meets the criterion of any one clause (clause-1 OR clause-2 OR clause-3, etc.).
The filter id,50,2|id,52,2 means "exclude any document whose id field equals 50 or 52."
Comparison Modes
Exclude a document if its value in the specified field
1 is not equal to the criterion (!=)
2 is equal to the criterion (==)
3 is less than the criterion (<)
4 is greater than the criterion (>)
5 is less than or equal to the criterion (<=)
6 is greater than or equal to the criterion (>=)
7 does not contain the text of the criterion
8 does contain the text of the criterion
9 case insenstive version of #7 - does contain the text of the criterion
10 case insenstive version of #8 - does contain the text of the criterion
IMPORTANT : here the tv should be allowed as result with the withTvs or tvPhx parameters
Also, can i run two different installs of Ajax Search on the same site?
Extract from ajaxSearch_readme.txt:
---- &asId [ string | ''] - Unique id for AjaxSearch instance (optional)
Any combination of characters a-z, underscores, and numbers 0-9
This is case sensitive. Default = empty string
This parameter allow distinguish several Ajaxsearch instances on the same page
The id is used to link the snippet calls between them.
Choose a short name. eg: "as2"
You could also look at this post:
http://modxcms.com/forums/index.php/topic,54396.msg314139.html#msg314139