Hi Patrick,
OK, thanks for the clarification. Here are the things I would try next:
1) Upgrade to 3.1-4. I am not sure that will resolve your current
situation, but it is a good idea anyway.
2) Try to simplify the issue a little to figure out what is going on.
Here is what I would do:
a) create a fresh database (create a new forest, create a new
database, attach the new forest to the new database)
b) load a single document that has the structure you want. For
example, you could run something like this in cq against your new db:
xdmp:document-insert("/test.xml", <RootElement><InsurancePolicy
index="123">some text</InsurancePolicy></RootElement>)
c) try running
cts:element-attribute-values(xs:QName("InsurancePolicy"),xs:QName("index
")) against your new db. It should throw XDMP-ELEMATTRRIDXNOTFOUND:
d) create the attribute index with type string, parent localname
"InsurancePolicy", localname "Index". If you created the db with the
default options, it will automatically reindex (will happen quickly
since there is only one doc in the db).
e) run the lexicon query again. It should return "123"
I hope this helps.
-Danny
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Patrick
Force
Sent: Thursday, January 11, 2007 12:13 PM
To: [email protected]
Subject: [MarkLogic Dev General] max function alternatives
UPDATED
Sorry for the confusion. My initial post used generic values as
reference points and I accidentally used the real element/attribute
names when I displayed the query. My actual attribute index and XQuery
as I've set it:
element QName: InsurancePolicy
attribute QName: index
cts:element-attribute-values(xs:QName("InsurancePolicy"),xs:QName("index
"))
Sorry for the confusion. With that in mind, should we upgrade
to 3.1-4? It's seeming more and more like this might be a
support/upgrade issue in the attribute index setting. Thanks again.
Patrick
Hi Patrick,
In looking again at what you are trying to do, I think perhaps
you have
set up the index on the wrong element/attribute conbination. I
may not
have this correct, but based on what it says below, here is what
I see.
Below, you say you have an index on the following:
element QName: RootElement
attribute QName: index
But the query you are trying to perform is this:
cts:element-attribute-values(xs:QName("InsurancePolicy"),xs:QName("id"))
This query requires the range index on:
element QName: InsurancePolicy
attribute QName: id
So I guess the thing to verify is exactly what index do you have
created, and exactly what query are you trying to perform.
-Danny
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general