add wildcards at start of search string

30/05/12

Permalink 04:30:33 pm, by sarneil, 97 words, 62 views   English (CA)
Categories: Activity log; Mins. worked: 60

add wildcards at start of search string

I discovered that I can append an option to the ft query that allows wildcards at the start of the search string. I added a searchClauseOptions variable

let $searchClauseOptions := '<options><leading-wildcard>yes</leading-wildcard></options>'

and then passed that in as an argument to the search clause:

fn:concat('[tei:text/tei:body[ft:query(.,"', $searchterm, '",', $searchClauseOptions, ')]]')

There's a lot of escaping of string delimiters as that search clause itself ends up as a string which is eval'd to generate the results.

Pingbacks:

No Pingbacks for this post yet...

FrancoToile

The prime objective of this project is to create a prototype of a searchable digital video library representing francophone culture. It is to be implemented in French 262.

Reports

Categories

May 2013
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

XML Feeds