问题
如何创建单个通配符搜索筛选器,以允许按多个不连续的关键字进行搜索。
例如,在“quartz sphinx”上搜索应该返回“Sphinx of black quartz, judge my vow.”
如何创建单个通配符搜索筛选器,以允许按多个不连续的关键字进行搜索。
例如,在“quartz sphinx”上搜索应该返回“Sphinx of black quartz, judge my vow.”
[Search Product Name]="" //show everything if the parameter is blank, aka everything is TRUE OR ( CONTAINS(LOWER([Product Name]),LOWER(SPLIT([Search Product Name]," ",1))) //if [Product Name] contains the first typed search term AND ( SPLIT([Search Product Name]," ",2) = "" //if there isn't a second search term, just return TRUE OR CONTAINS(LOWER([Product Name]),LOWER(SPLIT([Search Product Name]," ",2))) //check that the second search term is also in [Product Name] ) AND (SPLIT([Search Product Name]," ",3)="" OR CONTAINS(LOWER([Product Name]),LOWER(SPLIT([Search Product Name]," ",3)))) AND (SPLIT([Search Product Name]," ",4)="" OR CONTAINS(LOWER([Product Name]),LOWER(SPLIT([Search Product Name]," ",4)))) AND (SPLIT([Search Product Name]," ",5)="" OR CONTAINS(LOWER([Product Name]),LOWER(SPLIT([Search Product Name]," ",5)))) )
[Search Product Name]=""
OR CONTAINS(LOWER([Product Name]),LOWER(SPLIT([Search Product Name]," ",1)))
OR (
NOT SPLIT([Search Product Name]," ",2)=""
AND CONTAINS(LOWER([Product Name]),LOWER(SPLIT([Search Product Name]," ",2)))
) //If the 2nd search term is NOT blank and is contained in [Product Name] then return TRUE
OR (NOT SPLIT([Search Product Name]," ",3)="" AND CONTAINS(LOWER([Product Name]),LOWER(SPLIT([Search Product Name]," ",3))))
OR (NOT SPLIT([Search Product Name]," ",4)="" AND CONTAINS(LOWER([Product Name]),LOWER(SPLIT([Search Product Name]," ",4))))
OR (NOT SPLIT([Search Product Name]," ",5)="" AND CONTAINS(LOWER([Product Name]),LOWER(SPLIT([Search Product Name]," ",5))))