I have an xpage where I'm looking in a view for products where the productname itself (viewScope.product) contains in it's name sometime a '*' for example productname 'apple 2 * d1' and productname 'apple 3 * p' and productname 'apple 2' etc
I don't succeed in obtaining the correct viewresults for the selected product (viewScope.product)
PS the search is an array since I have other selection criteria which do work
<xp:this.data>
<xp:dominoView var="viewPictures"
databaseName="product/demo.nsf" viewName="demo3">
<xp:this.search><![CDATA[#{javascript:var tmpArray = new Array("");
var cTerms = 0;
tmpArray[cTerms++] = "(FIELD Prod = \"" + viewScope.product + "\")";
return tmpArray.toString();
return qstring
]]></xp:this.search>
</xp:dominoView>
</xp:this.data>
You can use? as a replacement for any one character when doing full text search.
Eg FIELD Prod = "apple 2? d1"
If there are documents that contains other combinations, eg "apple t X d1", this would be included in the search. I don't know of a way to escape * in full text search.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.