Peter, that's an example of structured proximity searching and that has been abandoned in the OASIS CQL spec, the most recent draft of which is at  which I recommend that you look at, because it  clarifies (and simplifies) proximity.   

The example you cite tries to find the index name 'cql' and corresponding value 'resultSetId' in the same "element".  It was actually the (now defunct) SRU Editorial Board (before the OASIS committee was formed) that concluded that this type of search was not appropriate for cql (at least not for the cql context set) because it was too hard to define what an element is. So it isn't supported in 2.0 (although a context set could be defined that would support it).


-----Original Message-----
From: SRU (Search and Retrieve Via URL) Implementors [mailto:[log in to unmask]] On Behalf Of Peter Noerr
Sent: Friday, July 02, 2010 5:23 PM
To: [log in to unmask]
Subject: CQL example for prox/unit=

For my sins I have been trying to rationalize our internal proximity search representations, and thought comparison with CQL would be instructive. I finally found "prox" as a Boolean operator (not my choice, but that is not the issue here). To be sure I understood things I went through the definitions and then the examples. All was well until the very last example on the very last page (ok, the second page – but the last one).

So at   is the example:

zeerex.set = cql prox/unit=element/distance=0 zeerex.index = resultSetId Find the cql context set in the same element as the index name resultSetId. E.g. search for cql.resultSetId

My reading suggests this is a search for "cql.zeerex.index", not "cql.resultSetId".  If the example is correct as it stands could somebody explain how/why. And also explain why the example has "zeerex.set =" on the beginning and "= resultSetId" on the end, when these really have nothing to do with the "unit=element/distance=0" that the example is trying to clarify. This is the only example so encumbered, and it has, obviously, managed to confuse me.