index:facets()
Friday, 5 October 2012 · 4 messages
CM
Cerstin Elisabeth Mahlow5 Oct 2012 18:46 #
Hi,
after Andreas recommended using
index:facets(), my application speeds up.
However, I don't think that this is the best solution. The database, I apply this function to is changing constantly. As the function is using the index, I would have to re-create the index first, is this correct? So that the functions would give wrong results most of the time.
And I found another strange thing: I had to delete some nodes and re-created all indexes. However, index:facets() still gives the information from the status *before* the deletion, i.e., it counts nodes that aren't there anymore. Therefore I don't use it.
count(//entry/selected[text () = "yes"])
gives the correct result,index:facets("collect", "flat")//element[@name = "selected"]/entry[text() = "yes"]/@count/data()still gives the wrong result, i.e., the result that was correct some days ago.
Is this a bug or a feature?
Best regards
Cerstin
--
Dr. phil. Cerstin Mahlow
Universität Basel
Departement Sprach- und Literaturwissenschaften
Fachbereich Deutsche Sprach- und Literaturwissenschaft
Nadelberg 4
4051 Basel
Schweiz
Tel: +41 61 267 07 65
Fax: +41 61 267 34 40
Mail: cerstin.mahlow at unibas.ch
Web: http://www.oldphras.net
AW
Andreas Weiler5 Oct 2012 18:51 #
Hi Cerstin,
Quoted text · Cerstin Elisabeth Mahlow · 1 line
> re-created all indexes
which indexes did you re-created?
The information of
index:facets is stored in the path index and therefore only "optimize all" is updating this index structure.
-- AndreasQuoted text · Cerstin Elisabeth Mahlow · 40 lines
Am 05.10.2012 um 18:46 schrieb Cerstin Elisabeth Mahlow: > Hi, > > after Andreas recommended using index:facets(), my application speeds up. > > However, I don't think that this is the best solution. The database, I apply this function to is changing constantly. As the function is using the index, I would have to re-create the index first, is this correct? So that the functions would give wrong results most of the time. > > And I found another strange thing: I had to delete some nodes and re-created all indexes. However, index:facets() still gives the information from the status *before* the deletion, i.e., it counts nodes that aren't there anymore. Therefore I don't use it. > > count(//entry/selected[text () = "yes"]) > > gives the correct result, > > index:facets("collect", "flat")//element[@name = "selected"]/entry[text() = "yes"]/@count/data() > > still gives the wrong result, i.e., the result that was correct some days ago. > > Is this a bug or a feature? > > Best regards > > Cerstin > -- > Dr. phil. Cerstin Mahlow > > Universität Basel > Departement Sprach- und Literaturwissenschaften > Fachbereich Deutsche Sprach- und Literaturwissenschaft > Nadelberg 4 > 4051 Basel > Schweiz > > Tel: +41 61 267 07 65 > Fax: +41 61 267 34 40 > Mail: cerstin.mahlow at unibas.ch > Web: http://www.oldphras.net > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
CM
Cerstin Elisabeth Mahlow5 Oct 2012 18:54 #
Hi Andreas,
I created all indexes as such and I clicked "optimize". I also closed the GUI, opened it new, droped all indexes and did optimization again.
However, your comment implicitly confirms that I can use
index:facets() only when the database is somewhat stable and not in constant flux as in our scenario.
Best regards
Cerstin--
Dr. phil. Cerstin Mahlow
Universität Basel
Departement Sprach- und Literaturwissenschaften
Fachbereich Deutsche Sprach- und Literaturwissenschaft
Nadelberg 4
4051 Basel
Schweiz
Tel: +41 61 267 07 65
Fax: +41 61 267 34 40
Mail: cerstin.mahlow at unibas.ch
Web: http://www.oldphras.net
Quoted text · Andreas Weiler · 51 lines
Von: Andreas Weiler [andreas.weiler at uni-konstanz.de] Gesendet: Freitag, 5. Oktober 2012 18:51 An: Cerstin Elisabeth Mahlow Cc: basex-talk at mailman.uni-konstanz.de Betreff: Re: [basex-talk] index:facets() Hi Cerstin, > re-created all indexes which indexes did you re-created? The information of index:facets is stored in the path index and therefore only "optimize all" is updating this index structure. -- Andreas Am 05.10.2012 um 18:46 schrieb Cerstin Elisabeth Mahlow: > Hi, > > after Andreas recommended using index:facets(), my application speeds up. > > However, I don't think that this is the best solution. The database, I apply this function to is changing constantly. As the function is using the index, I would have to re-create the index first, is this correct? So that the functions would give wrong results most of the time. > > And I found another strange thing: I had to delete some nodes and re-created all indexes. However, index:facets() still gives the information from the status *before* the deletion, i.e., it counts nodes that aren't there anymore. Therefore I don't use it. > > count(//entry/selected[text () = "yes"]) > > gives the correct result, > > index:facets("collect", "flat")//element[@name = "selected"]/entry[text() = "yes"]/@count/data() > > still gives the wrong result, i.e., the result that was correct some days ago. > > Is this a bug or a feature? > > Best regards > > Cerstin > -- > Dr. phil. Cerstin Mahlow > > Universität Basel > Departement Sprach- und Literaturwissenschaften > Fachbereich Deutsche Sprach- und Literaturwissenschaft > Nadelberg 4 > 4051 Basel > Schweiz > > Tel: +41 61 267 07 65 > Fax: +41 61 267 34 40 > Mail: cerstin.mahlow at unibas.ch > Web: http://www.oldphras.net > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
AW
Andreas Weiler5 Oct 2012 19:00 #
Hi Cerstin,
Quoted text · Cerstin Elisabeth Mahlow · 1 line
> However, your comment implicitly confirms that I can use index:facets() only when the database is somewhat stable and not in constant flux as in our scenario.
Yes thats true, in our scenario it is used to get a quick overview about a very large database and to configure the query frontend. However our data is not changing over time.
Kind regards,
Andreas
Quoted text · Cerstin Elisabeth Mahlow · 87 lines
Am 05.10.2012 um 18:54 schrieb Cerstin Elisabeth Mahlow: > Hi Andreas, > > I created all indexes as such and I clicked "optimize". I also closed the GUI, opened it new, droped all indexes and did optimization again. > > However, your comment implicitly confirms that I can use index:facets() only when the database is somewhat stable and not in constant flux as in our scenario. > > Best regards > > Cerstin > -- > Dr. phil. Cerstin Mahlow > > Universität Basel > Departement Sprach- und Literaturwissenschaften > Fachbereich Deutsche Sprach- und Literaturwissenschaft > Nadelberg 4 > 4051 Basel > Schweiz > > Tel: +41 61 267 07 65 > Fax: +41 61 267 34 40 > Mail: cerstin.mahlow at unibas.ch > Web: http://www.oldphras.net > ________________________________________ > Von: Andreas Weiler [andreas.weiler at uni-konstanz.de] > Gesendet: Freitag, 5. Oktober 2012 18:51 > An: Cerstin Elisabeth Mahlow > Cc: basex-talk at mailman.uni-konstanz.de > Betreff: Re: [basex-talk] index:facets() > > Hi Cerstin, > >> re-created all indexes > > which indexes did you re-created? > The information of index:facets is stored in the path index and therefore only "optimize all" is > updating this index structure. > > -- Andreas > > Am 05.10.2012 um 18:46 schrieb Cerstin Elisabeth Mahlow: > >> Hi, >> >> after Andreas recommended using index:facets(), my application speeds up. >> >> However, I don't think that this is the best solution. The database, I apply this function to is changing constantly. As the function is using the index, I would have to re-create the index first, is this correct? So that the functions would give wrong results most of the time. >> >> And I found another strange thing: I had to delete some nodes and re-created all indexes. However, index:facets() still gives the information from the status *before* the deletion, i.e., it counts nodes that aren't there anymore. Therefore I don't use it. >> >> count(//entry/selected[text () = "yes"]) >> >> gives the correct result, >> >> index:facets("collect", "flat")//element[@name = "selected"]/entry[text() = "yes"]/@count/data() >> >> still gives the wrong result, i.e., the result that was correct some days ago. >> >> Is this a bug or a feature? >> >> Best regards >> >> Cerstin >> -- >> Dr. phil. Cerstin Mahlow >> >> Universität Basel >> Departement Sprach- und Literaturwissenschaften >> Fachbereich Deutsche Sprach- und Literaturwissenschaft >> Nadelberg 4 >> 4051 Basel >> Schweiz >> >> Tel: +41 61 267 07 65 >> Fax: +41 61 267 34 40 >> Mail: cerstin.mahlow at unibas.ch >> Web: http://www.oldphras.net >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Written for BaseX 7.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery