Harry, what do your search options look like? Can you share those? A couple of troubleshooting tips you might try:
Run search:parse() in place of search:search(), using the same query and options you're running. See what the parsed query tree looks like. Does the query have the wildcarded option? Run search:check-options($options). If you've put the wildcarded option in the wrong place in the structure, for example, this will help you identify that issue. --Colleen ________________________________________ From: [email protected] [[email protected]] On Behalf Of Harry B. [[email protected]] Sent: Tuesday, October 02, 2012 12:31 PM To: General MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Wildcards in search:search I am wondering if there's a nuance to searching for a wildcard when using search:search. If my xml looks like: <fileInfo> <filename>abcde.png</filename> <filesize>5kb</filesize> ... </fileInfo> When searching, the search string is constrained to search filename and is wildcarded, for example, filename:*c* I am getting back hits where the filename value doesn't have a "c" in it with search:seach. If I write my own cts queries to search against filename, they all come back as expected, only getting results that have a c. That query: cts:element-word-query(xs:QName("filename"),$q,("case-insensitive","diacritic-insensitive","wildcarded")) What am I doing wrong? I have tried explicitly adding the wildcarded option in the options xml, but that doesn't help. I get the identical result set to the search:search query when I include my cts query as an additional query in search:search. Thanks, Harry _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
