Indexing on namespaced attributes (eXist 2.2)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Indexing on namespaced attributes (eXist 2.2)

Jo Calder
Hi all,

It does not seem possible to use an index specification such as:

     <index xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:xlink="http://www.w3.org/1999/xlink">
         <range>
             <create qname="@xlink:href" type="xs:string"/>
             <create qname="@gml:id" type="xs:string"/>
             <create qname="gml:identifier" type="xs:string"/>
         </range>
     </index>

Looking at the indexes via monex, the "gml:identifier" index looks to be
functioning perfectly.  Either of the other two gives rise to the
following exception:

err:XPTY0004 checking function parameter 2 in call util:log("DEBUG", concat("INDEXES qname     :    ", $indexes:qname)): Invalid lexical form of either prefix or local name. [at line 207, column 70, source: /db/apps/monex/modules/indexes.xqm]
In function:
        indexes:show-index-keys(node(), map) [32:9:/db/apps/monex/modules/indexes.xqm]
        templates:call-with-args(function, function*, element(), map) [208:13:/home/exist/eXist-db/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql]
        templates:process-output(element(), map, item()*, element()) [205:9:/home/exist/eXist-db/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql]
         ...

Commenting out the log call in the module appears to lead to later
failures, and null output from the page.

Query performance suggests that the relevant indices are not created.

Obviously, building a document which removes the namespacing is a
possible, but quite costly, workaround.  So, have I missed something
obvious?

Install details are:

eXist Version: 2.2
eXist Build: 20141120
Operating System: Linux 4.4.0-64-generic amd64


Best regards, -- Jo

--
======================================
Managed AIS
2FR 44 Hanover Street
Edinburgh
EH2 2DR

T: +44 (0)131 226 5893
M: +44 (0)777 162 0433
F: +44 (0)131 777 8015
 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Indexing on namespaced attributes (eXist 2.2)

Joe Wicentowski
Hi Jo,

That bug - in the monex app, not eXist itself, which happily indexes your namespaced attributes - was fixed in a more recent version of monex than shipped with eXist 2.2:


By the time of this fix, monex's development branch was no longer compatible with eXist 2.2. If you are eager to use monex to explore this index, I would encourage you to upgrade to eXist 3.0. Is that feasible? 

Joe


On Mon, Feb 27, 2017 at 6:36 AM Jo Calder <[hidden email]> wrote:
Hi all,

It does not seem possible to use an index specification such as:

     <index xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:xlink="http://www.w3.org/1999/xlink">
         <range>
             <create qname="@xlink:href" type="xs:string"/>
             <create qname="@gml:id" type="xs:string"/>
             <create qname="gml:identifier" type="xs:string"/>
         </range>
     </index>

Looking at the indexes via monex, the "gml:identifier" index looks to be
functioning perfectly.  Either of the other two gives rise to the
following exception:

err:XPTY0004 checking function parameter 2 in call util:log("DEBUG", concat("INDEXES qname     :    ", $indexes:qname)): Invalid lexical form of either prefix or local name. [at line 207, column 70, source: /db/apps/monex/modules/indexes.xqm]
In function:
        indexes:show-index-keys(node(), map) [32:9:/db/apps/monex/modules/indexes.xqm]
        templates:call-with-args(function, function*, element(), map) [208:13:/home/exist/eXist-db/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql]
        templates:process-output(element(), map, item()*, element()) [205:9:/home/exist/eXist-db/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql]
         ...

Commenting out the log call in the module appears to lead to later
failures, and null output from the page.

Query performance suggests that the relevant indices are not created.

Obviously, building a document which removes the namespacing is a
possible, but quite costly, workaround.  So, have I missed something
obvious?

Install details are:

eXist Version:  2.2
eXist Build:    20141120
Operating System:       Linux 4.4.0-64-generic amd64


Best regards, -- Jo

--
======================================
Managed AIS
2FR 44 Hanover Street
Edinburgh
EH2 2DR

T: +44 (0)131 226 5893
M: +44 (0)777 162 0433
F: +44 (0)131 777 8015



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
--
Sent from my iPhone

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Indexing on namespaced attributes (eXist 2.2)

Jo Calder

Hi Joe,

Thanks for the info.  An upgrade to 3.0 is in the offing.

Best regards, -- Jo


On 27/02/2017 12:48, Joe Wicentowski wrote:
Hi Jo,

That bug - in the monex app, not eXist itself, which happily indexes your namespaced attributes - was fixed in a more recent version of monex than shipped with eXist 2.2:


By the time of this fix, monex's development branch was no longer compatible with eXist 2.2. If you are eager to use monex to explore this index, I would encourage you to upgrade to eXist 3.0. Is that feasible? 

Joe


On Mon, Feb 27, 2017 at 6:36 AM Jo Calder <[hidden email]> wrote:
Hi all,

It does not seem possible to use an index specification such as:

     <index xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:xlink="http://www.w3.org/1999/xlink">
         <range>
             <create qname="@xlink:href" type="xs:string"/>
             <create qname="@gml:id" type="xs:string"/>
             <create qname="gml:identifier" type="xs:string"/>
         </range>
     </index>

Looking at the indexes via monex, the "gml:identifier" index looks to be
functioning perfectly.  Either of the other two gives rise to the
following exception:

err:XPTY0004 checking function parameter 2 in call util:log("DEBUG", concat("INDEXES qname     :    ", $indexes:qname)): Invalid lexical form of either prefix or local name. [at line 207, column 70, source: /db/apps/monex/modules/indexes.xqm]
In function:
        indexes:show-index-keys(node(), map) [32:9:/db/apps/monex/modules/indexes.xqm]
        templates:call-with-args(function, function*, element(), map) [208:13:/home/exist/eXist-db/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql]
        templates:process-output(element(), map, item()*, element()) [205:9:/home/exist/eXist-db/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql]
         ...

Commenting out the log call in the module appears to lead to later
failures, and null output from the page.

Query performance suggests that the relevant indices are not created.

Obviously, building a document which removes the namespacing is a
possible, but quite costly, workaround.  So, have I missed something
obvious?

Install details are:

eXist Version:  2.2
eXist Build:    20141120
Operating System:       Linux 4.4.0-64-generic amd64


Best regards, -- Jo

--
======================================
Managed AIS
2FR 44 Hanover Street
Edinburgh
EH2 2DR

T: +44 (0)131 226 5893
M: +44 (0)777 162 0433
F: +44 (0)131 777 8015



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
--
Sent from my iPhone

-- 
======================================
AIXM Consultant and Software Architect
Managed AIS
2FR 44 Hanover Street
Edinburgh
EH2 2DR 

T: +44 (0)131 226 5893
M: +44 (0)777 162 0433
F: +44 (0)131 777 8015
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open