Justin, Yeah, I saw that, but it's not what I'm asking about. That section describes simple infix grammar (dog near cat) with a default distance. That works fine in 4.1 search:search.
What I'm asking about is the parameterized form (dog near/4 cat). That grammar definition (in 4.2) names an "apply" function of "near2". See the <joiner> element below, and note the value "near/". The near2 function does not seem to be in the 4.1 search:search library. Any solutions for 4.1? On Mar 21, 2011, at 5:05 PM, Justin Makeig wrote: > Ron, > Have a look at section 2.6 of the 4.1 “Search Developer’s Guide” > <http://developer.marklogic.com/pubs/4.1/books/search-dev-guide.pdf>. It has > an example of extending the search grammar to include near-query. > > Justin > > On Mar 21, 2011, at 10:00 AM, Ron Hitchens wrote: > >> >> I'm starting to get into using the ML search:search >> library pretty seriously. Unfortunately, for the time >> being I need to stay on 4.1.x but would like to make >> use of near queries with a specified distance. >> >> In the search:search library on 4.2, this is easily >> accomplished by adding this to the grammar definition: >> >> <joiner strength="30" apply="near2" consume="2" >> element="cts:near-query">near/</joiner> >> >> However, this doesn't work in 4.1, apparently >> because the "near2" function is not a part of the >> search:search library. >> >> Since it winds up calling cts:near-query underneath, >> is it possible to lashup some parameterized near query >> grammar for the 4.1 version of search:search? Can this >> be done simply with a user-supplied function? Has anyone >> already done this? >> >> --- >> Ron Hitchens {mailto:[email protected]} Ronsoft Technologies >> +44 7879 358 212 (voice) http://www.ronsoft.com >> +1 707 924 3878 (fax) Bit Twiddling At Its Finest >> "No amount of belief establishes any fact." -Unknown >> >> >> >> >> _______________________________________________ >> General mailing list >> [email protected] >> http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general --- Ron Hitchens {mailto:[email protected]} Ronsoft Technologies +44 7879 358 212 (voice) http://www.ronsoft.com +1 707 924 3878 (fax) Bit Twiddling At Its Finest "No amount of belief establishes any fact." -Unknown _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
