query function like matches can't work fast as = op , how to optimizer it? how to create range index?

Monday, 18 November 2013 · 7 messages · last reply 11 Jan 2014
E
easy18 Nov 2013 15:56 #
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.
-- 此致 easy 莫愁前路无知己,天下谁人不识君。
CG
Christian Grün18 Nov 2013 21:02 #
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
E
easy19 Nov 2013 00:51 #
Thanks. but there is some way to create path/range index manually?
-- 此致 easy 莫愁前路无知己,天下谁人不识君。
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
CG
Christian Grün19 Nov 2013 01:24 #
I can recommend our Wiki article on indexing [1]; it should answer some of your questions. Best, Christian [1] http://docs.basex.org/wiki/Indexes
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 > > >
E
easy19 Nov 2013 02:32 #
oh, that's to say, basex create path index automatically? no way to create a path index like : node1/node2/@attribue ?
-- 此致 easy 莫愁前路无知己,天下谁人不识君。
Quoted text · Christian Grün · 1 line
At 2013-11-19 08:24:26,"Christian Grün" <christian.gruen at gmail.com> wrote:
I can recommend our Wiki article on indexing [1]; it should answer some of your questions. Best, Christian [1] http://docs.basex.org/wiki/Indexes
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 > > >
E
easyin reply to Christian Grün, 18 Nov 2013, 21:022 Jan 2014 05:41 #
hi,all I have download the trunk version basex, but I run in centeros, is there some different for different os?
-- 此致 easy 莫愁前路无知己,天下谁人不识君。
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
CG
Christian Grün11 Jan 2014 12:54 #
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 [1] http://basex.org/download

⚡Generated with XQuery