> > The other problem with the above is that someone (e.g. me)
> is going to
> > ask what other values of unit and distance are permisable
> in the above
> > and what they mean
>
> And someone, eg me, will refer you to the CQL documentation :)
Which says
unit
The type of unit for the distance.
Takes the form:
unit=[value]
where value is one of: 'paragraph', 'sentence', 'word' and 'element', or
a value from another context set.
It doesn't actually say what "paragraph", "sentence", "word" *mean* -
however, I take it that these can only be used in a textual sense. So
sentence and word have some meaning within a MARC context set, but
paragraph doesn't really.
> Sure. That means: Within the same sentence. I don't follow your
> objection?
Mainly you don't normally associate sentences with MARC records
(especially if searching in indicators!)
> > Indeed is element the right unit here (to me I'd argue that element
> > meant subfields whereas sentence meant the whole field?
> > proc/unit=element/distance=1
> >
> > Would distance in this case mean nearby fields within the record as
> > present in the database (in which the fields might not be ordered
> > sequentially) or within fields with closeby MARC tag names?
> Is there a
> > case for being able to do either?
>
> No. If you search in marc.500a, then your element level is
> 500a If you search in marc.500, then your element level is 500.
> If you mix, then it's the more inclusive of the two operands.
>
> eg:
> marc.500a any bah prox/unit=element/distance=0 marc.500a any baz
>
> Finds bah and baz in the same marc.500a field.
>
> Eg2:
> marc.500 any bah prox// marc.500 any baz
>
> Finds bah and baz in the same marc.500 field, as a flat text.
>
> Eg3:
> marc.500 any bah prox// marc.500a any baz
>
> Finds bah in 500, and baz in a $a subfield of the 500 that
> contained bah.
Well then we have a problem - your last example works because 500$a is
included within 500.
However, in the case of
marc.500:1 any 1 prox// marc.500a any baz
The element level of the first operand is 500 indicator 1, whereas the
element level of the second operand is 500 subfield $a. Neither of these
is contained within the other, so there isn't a more inclusive element
level of the two operands. Similarly
marc.500$a any bah prox// marc.500$b any baz
In both cases, it is clear that the element level needs to be marc.500
for this to work as but is this is what is actually meant by the
definition of "element" (or lack thereof).
However, you've still not answered my original question which is what do
non-zero values of distance mean in this case - i.e. what does
marc.500:1 any 1 prox/unit=element/distance=2 marc.500a any baz
mean?
Matthew
|