From: "Matthias Hess" <[log in to unmask]>
> For example, we would like perform a search where the two words "Albert
> Einstein" appear next to each other.
.....
> In CQL 1.1, I might come up with (Example 1)
> myField any "Albert Einstein"
That means match if either word occurs. It would match "Albert Einstein",
"albert Pujols", "prince albert", or "Einstein Bagels"
What you want (in CQL 1.1) would be
myField="Albert Einstein"
in CQL 1.1 it means match "Albert" adjacent to and preceding "einstein"
i.e. it would match
"Albert Einstein"
"Albert Einstein boy wonder"
"boy wonder Albert Einstein"
but not
"Albert Xavier Einstein")
Note that this was changed in 1.2, because the "=" relation used to mean
adjacency is not very intuitive, and so the 'adj' relation was added, so the
query would be
myField adj "Albert Einstein"
> The same questions come up with wildcards:
>
> Should I search for (Example 4)
> myField any "alumin*um"
>
> or rather (Example 5)
> myField any "alumin%um"
See http://www.loc.gov/standards/sru/resources/cql-context-set-v1-2.html
(masking)
'*' is used to mask zero or more characters. thus: myField any alumin*um
--Ray
|