Hi Bill (cc to the list),
the current fulltext global indexing options (specified via SET) are applied and stored in the target database whenever an index is created via CREATE INDEX. If OPTIMIZE is used, these database options will be used for recreating the index. Both the database options and index structures should not get lost if you restart your server.
The following (non-server) example may help to demonstrate that fulltext options such as stemming will be stored along with the database:
basex -c "set stemming on;set ftindex on; create db db <a>A</a>; optimize; close; set stemming off; open db;info index fulltext"
Btw, which BaseX version do you use? It would be interesting to see what happens with our latest stable snapshot [1]; the final version is long overdue, but it will finally be released in December.
Christian
[1] http://files.basex.org/releases/latest/ ___________________________
HI Christian,
Thanks for the fast reply.
I tried your steps, with no change. I am curious about a couple of things I notice:
Using these command I enabled fulltext with stemming:
set stemming true create index fulltext
And info index shows these to be true. But if I stop the server and restart, these are all off, and the fulltext index is gone (the collection and it's files are still there). And yet, the same flawed search still works.
So my questions are: Do we need to reset globals and reindex each time the server is restart? It our implimentation it seems so (running standalone mode).
Thanks.
-bb
On Nov 30, 2012, at 8:50 AM, Christian Grün wrote:
Hi Bill,
I'm having trouble figuring out how exactly to enable fulltext XQuery searches. We have it working, but quite a few keywords are not being indexed. [...]
as you already indicated, the fulltext index gets lost when performing updates. If you set FTNDEX to TRUE before creating your database, your fulltext index will always be recreated when calling OPTIMIZE:
set ftindex true create db dorr_index add ... optimize
for $i in collection(PATH)//item let $s := $i/mhs:sort where $i contains text ("QUERY" using stemming) return ...
I know too less about your xml structure, so it's difficult to tell what/if sth. goes wrong. Does the behavior change when following the steps suggested above?
Cheers, Christian ___________________________
for $i in collection(PATH)//item let $s := $i/mhs:sort where $i contains text ("QUERY" using stemming) return ...
Are there any steps missing? Also, any tutorial out there to follow?
Thanks very much in advance!
-Bill B
Bill Beck, Web Development Specialist Massachusetts Historical Society 1154 Boylston Street, Boston, MA 02215 Tel: 617-646-0505, Fax: 617-859-0074 www.masshist.org - America's Oldest Historical Society - Founded 1791
In Death Lamented: The Tradition of Anglo-American Mourning Jewelry opens on 28 September 2012 and runs through 31 January 2013. The exhibition will be on display Monday through Saturday from 10 AM to 4 PM. More information is available at www.masshist.org/events/. _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
-- Bill Beck, Web Development Specialist Massachusetts Historical Society 1154 Boylston Street, Boston, MA 02215 Tel: 617-646-0505, Fax: 617-859-0074 www.masshist.org - America's Oldest Historical Society - Founded 1791
In Death Lamented: The Tradition of Anglo-American Mourning Jewelry opens on 28 September 2012 and runs through 31 January 2013. The exhibition will be on display Monday through Saturday from 10 AM to 4 PM. More information is available at www.masshist.org/events/.
basex-talk@mailman.uni-konstanz.de