|
From: Andreas W. <And...@em...> - 2021-02-17 09:02:33
|
Dear all,
Is it still the case that the new range index is not recommended to be
used with matches() queries?
I am currently in the process of speeding up various xquery modules in
my database. I have found one function that, according to monex
profiling, is not using any index:
```xquery
matches(@n, '^[A-Za-z0-9\[\]]+$'))
```
It is meant to check if the @n attribute contains alphanumeric
characters only, eventually combined with square brackets.
Now, reading up on the ("new") range index, the page
https://exist-db.org/exist/apps/doc/newrangeindex says "fn:matches is
currently not supported due to limitations in Lucene's regular
expression handling. If you require fn:matches a lot, consider using the
old range index." Is this still the case?
If so, would defining an old range index on the @n attribute mess with
more specific new range index definitions that I need in other places,
like
```xml
<range>
<create qname="tei:div">
<field name="tei.div.n" match="@n" type="xs:string"/>
<field name="tei.div.type" match="@type" type="xs:string"/>
</create>
</range>
```
Also, if you suggest defining an old range index, am I right that it
would look like this (without being wrapped inside a range element):
```xml
<create qname="@n" type="xs:string"/>
```
Thank you for any suggestions,
Andreas
--
Dr. Andreas Wagner twitter: @anwagnerdreas
Project "The School of Salamanca" web: http://salamanca.adwmainz.de
Academy of Sciences and Literature, Mainz fon: +49 (0)69/798-32774
and Institute of Philosophy fax: +49 (0)69/798-32794
Goethe University Frankfurt
IGF HP 25 / R 2.455
Norbert-Wollheim-Platz 1
60629 Frankfurt am Main
|