query function like matches can't work fast as = op , how to optimizer it? how to create range index?
hi,all,
I found the @attribute='value' operation will fast after create attribute index, but function like matches,contains,starts-with has no effect even after create text index. how to optimum it , how to create path index, range index?
thanks.
Hi Easy,
Quoted text · easy · 4 lines
> I found the @attribute='value' operation will fast after create attribute > index, but function like matches,contains,starts-with has no effect even > after create text index. > how to optimum it , how to create path index, range index?
matches() works on arbitrary regular expressions, which is why a value index won’t be of any help. contains() is difficult, too, because it allows you to search for arbitrary substrings. starts-with() could indeed be rewritten to take advantage of an index structure, but this hasn’t been done yet.
Christian
Thanks.
but there is some way to create path/range index manually?
Quoted text · Christian Grün · 15 lines
At 2013-11-19 04:02:28,"Christian Grün" <christian.gruen at gmail.com> wrote: >Hi Easy, > >> I found the @attribute='value' operation will fast after create attribute >> index, but function like matches,contains,starts-with has no effect even >> after create text index. >> how to optimum it , how to create path index, range index? > >matches() works on arbitrary regular expressions, which is why a value >index won’t be of any help. contains() is difficult, too, because it >allows you to search for arbitrary substrings. starts-with() could >indeed be rewritten to take advantage of an index structure, but this >hasn’t been done yet. > >Christian
I can recommend our Wiki article on indexing [1]; it should answer some of your questions.
Best, Christian
Quoted text · easy · 37 lines
Am 19.11.2013 00:51 schrieb "easy" <lin_xd at 126.com>: > > Thanks. > > but there is some way to create path/range index manually? > > > > > -- > 此致 > > easy > > 莫愁前路无知己,天下谁人不识君。 > > > At 2013-11-19 04:02:28,"Christian Grün" <christian.gruen at gmail.com> wrote: > >Hi Easy, > > > >> I found the @attribute='value' operation will fast after create attribute > >> index, but function like matches,contains,starts-with has no effect even > >> after create text index. > >> how to optimum it , how to create path index, range index? > > > >matches() works on arbitrary regular expressions, which is why a value > >index won’t be of any help. contains() is difficult, too, because it > >allows you to search for arbitrary substrings. starts-with() could > >indeed be rewritten to take advantage of an index structure, but this > >hasn’t been done yet. > > > >Christian > > >
oh, that's to say, basex create path index automatically? no way to create a path index like : node1/node2/@attribue ?
Quoted text · Christian Grün · 1 line
At 2013-11-19 08:24:26,"Christian Grün" <christian.gruen at gmail.com> wrote:
Quoted text · Christian Grün · 35 lines
Am 19.11.2013 00:51 schrieb "easy" <lin_xd at 126.com>: > > Thanks. > > but there is some way to create path/range index manually? > > > > > -- > 此致 > > easy > > 莫愁前路无知己,天下谁人不识君。 > > > At 2013-11-19 04:02:28,"Christian Grün" <christian.gruen at gmail.com> wrote: > >Hi Easy, > > > >> I found the @attribute='value' operation will fast after create attribute > >> index, but function like matches,contains,starts-with has no effect even > >> after create text index. > >> how to optimum it , how to create path index, range index? > > > >matches() works on arbitrary regular expressions, which is why a value > >index won’t be of any help. contains() is difficult, too, because it > >allows you to search for arbitrary substrings. starts-with() could > >indeed be rewritten to take advantage of an index structure, but this > >hasn’t been done yet. > > > >Christian > > >
hi,all
I have download the trunk version basex, but I run in centeros, is there some different for different os?
Quoted text · Christian Grün · 15 lines
At 2013-11-19 04:02:28,"Christian Grün" <christian.gruen at gmail.com> wrote: >Hi Easy, > >> I found the @attribute='value' operation will fast after create attribute >> index, but function like matches,contains,starts-with has no effect even >> after create text index. >> how to optimum it , how to create path index, range index? > >matches() works on arbitrary regular expressions, which is why a value >index won’t be of any help. contains() is difficult, too, because it >allows you to search for arbitrary substrings. starts-with() could >indeed be rewritten to take advantage of an index structure, but this >hasn’t been done yet. > >Christian
Hi Easy,
Quoted text · easy · 2 lines
> I have download the trunk version basex, but I run in centeros, is there > some different for different os?
the jar and zip versions work on all platforms supporting Java. Versions for special platforms can be found on our download page [1].
Best, Christian
Written for BaseX 7.7. BaseX may have changed since: please check the current documentation.