BXS - indexes - specifying the index and database location
Wednesday, 28 November 2012 · 4 messages · last reply 29 Nov 2012
AM
Alex Muir28 Nov 2012 22:40 #
Hi,
I've created this bxs script which creates a db, however some things are not as expected.
<?xml version="1.0" encoding="UTF-8"?>
<commands>
<drop-db name="S-1997"/>
<create-db name="S-1997"/>
<add
path="/mnt/basex_volume/i4Base-Basex7.3/stores/sample-data/1997/">/mnt/basex_volume/i4Base-Basex7.3/sample-data/1997/</add>
<create-index type="fulltext"/>
<optimize-all/>
<info-db/>
<info-index type="fulltext"/>
<close/>
</commands>I've written a script to call the bxs and create the database which it does however in this case it is not creating the indexes for fulltext as specified in the bxs and rather it is creating the text and attribute index. Why is that?
[ec2-user@soda scripts]$ ./load-data-basex-locally.sh
../configuration/load-data-basex-locally.cfg
Database Properties
Name: S-1997
Size: 1718 KB
Nodes: 51846
Documents: 4
Binaries: 0
Timestamp: 28.11.2012 15:23:26
Resource Properties
Timestamp: 28.11.2012 15:23:25
Encoding: UTF-8
Whitespace Chopping: ON
Indexes
Up-to-date: true
Text Index: ON
Attribute Index: ON
* Full-Text Index: OFF*
Full-Text Index
- Not available
I run the script from the dir /mnt/basex_volume/i4Base-Basex7.3/scripts and I end up getting a directory structure created in the scripts folder as follows starting with fulltext.
/mnt/basex_volume/i4Base-Basex7.3/scripts/*fulltext*
/mnt/basex_volume/i4Base-Basex7.3/stores/sample-data/1997
I would like to store the database and indexes in
/mnt/basex_volume/i4Base-Basex7.3/stores/sample-data/1997/ however I'm not clear on how to do this. I thought the
<add path="/mnt/basex_volume/i4Base-Basex7.3/stores/sample-data/1997/">would specify this
Thoughts?
Thanks
--
-
Alex G. Muir
Software Engineering Consultant
Linkedin Profile : http://ca.linkedin.com/pub/alex-muir/36/ab7/125 Love African Kora Music? Take a moment to listen to Gambia's - Amadu Diabarte & Jali Bakary Konteh www.bafila.bandcamp.com Your support keeps Africa's griot tradition alive... Cheers!
CG
Christian Grün29 Nov 2012 00:15 #
Hi Alex,
Quoted text · Alex Muir · 4 lines
> I've written a script to call the bxs and create the database which it does > however in this case it is not creating the indexes for fulltext as > specified in the bxs and rather it is creating the text and attribute index. > Why is that?
sorry for that! I notified a little bug in our XML command parser, which should now be fixed [1]
Quoted text · Alex Muir · 5 lines
> I run the script from the dir /mnt/basex_volume/i4Base-Basex7.3/scripts and > I end up getting a directory structure created in the scripts folder as > follows starting with fulltext. > > /mnt/basex_volume/i4Base-Basex7.3/scripts/fulltext/mnt/basex_volume/i4Base-Basex7.3/stores/sample-data/1997
I'll have a look into that later this day (MEST),
Christian
[1] http://files.basex.org/releases/latest/
CG
Hi Alex,
here’s my follow-up:
Quoted text · Alex Muir · 1 line
> /mnt/basex_volume/i4Base-Basex7.3/scripts/fulltext/mnt/basex_volume/i4Base-Basex7.3/stores/sample-data/1997
I assume that the "fulltext" directory was created by the bug I fixed yesterday; just give it another try.
Quoted text · Alex Muir · 6 lines
> I would like to store the database and indexes in > /mnt/basex_volume/i4Base-Basex7.3/stores/sample-data/1997/ > however I'm not > clear on how to do this. I thought the > <add path="/mnt/basex_volume/i4Base-Basex7.3/stores/sample-data/1997/"> > would specify this
The @path argument indicates the target path of your added documents within your database (which can then be listed via <list
name="S-1997"/>.
But I guess you’d like to change the location of your database directory? This can be done by updating the
DBPATH option in the .basex configuration file [1].
Christian
[1] http://docs.basex.org/wiki/ConfigurationAM
Alex Muir29 Nov 2012 16:24 #
The bug is in version 7.3
Download the 7.5 this morning and the following script everything worked great. I decided to just leave the database storage in the default location.
<?xml version="1.0" encoding="UTF-8"?>
<commands>
<drop-db name="S-DDEX"/>
<create-db name="S-DDEX"/>
<add>/mnt/basex_volume/i4Base-Basex7.3/sample-data/DDEX/</add>
<create-index type="text"/>
<create-index type="attribute"/>
<create-index type="fulltext"/>
<optimize-all/>
<info-index type="text"/>
<info-index type="attribute"/>
<info-index type="fulltext"/>
<list name="S-DDEX"/>
<info-db/>
<close/>
</commands>Without console output
Input
Path
Type Content-Type Size
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 20thCenturyIndustries_CIK0000100331_12311997_03311998_1__TEXT--sec14-toc-toci0-sub110-Mtrue-NM1-13false-13NM0-tab49-lis7-lisi0-para209-surP0-page.xml xml application/xml 11136
3ciCompleteComplianceCorp_CIK0000883787_09301997_01151998_1__TEXT--sec14-toc-toci0-sub77-Mtrue-NM1-13false-13NM0-tab30-lis20-lisi0-para118-surP0-page.xml xml application/xml 11981
3comCorp_CIK0000738076_05311997_08261997_1__TEXT--sec14-toc-toci0-sub68-Mtrue-NM1-13false-13NM0-tab9-lis4-lisi0-para285-surP0-page.xml xml application/xml 13023
3DSystemsCorp_CIK0000910638_12311997_03271998_1__TEXT--sec15-toc-toci0-sub116-Mtrue-NM1-13false-13NM0-tab37-lis13-lisi0-para217-surP0-page.xml xml application/xml 15706
4 Resources.
Database Properties
Name: S-1997
Size: 2371 KB
Nodes: 51846
Documents: 4
Binaries: 0
Timestamp: 2012-11-29-09-16-54
Resource Properties
Timestamp: 2012-11-29-09-16-54
Encoding: UTF-8
Whitespace Chopping: ON
Indexes
Up-to-date: true
Text Index: ON
Attribute Index: ON
Full-Text Index: ON
Thanks
Alex
On Thu, Nov 29, 2012 at 5:33 AM, Christian Grün
<christian.gruen at gmail.com>wrote:
Quoted text · Christian Grün · 29 lines
> Hi Alex, > > here’s my follow-up: > > > > /mnt/basex_volume/i4Base-Basex7.3/scripts/fulltext/mnt/basex_volume/i4Base-Basex7.3/stores/sample-data/1997 > > I assume that the "fulltext" directory was created by the bug I fixed > yesterday; just give it another try. > > > I would like to store the database and indexes in > > /mnt/basex_volume/i4Base-Basex7.3/stores/sample-data/1997/ > > however I'm not > > clear on how to do this. I thought the > > <add path="/mnt/basex_volume/i4Base-Basex7.3/stores/sample-data/1997/"> > > would specify this > > The @path argument indicates the target path of your added documents > within your database (which can then be listed via <list > name="S-1997"/>. > > But I guess you’d like to change the location of your database > directory? This can be done by updating the DBPATH option in the > .basex configuration file [1]. > > Christian > > [1] http://docs.basex.org/wiki/Configuration >
--
-
Alex G. Muir
Software Engineering Consultant
Linkedin Profile : http://ca.linkedin.com/pub/alex-muir/36/ab7/125 Love African Kora Music? Take a moment to listen to Gambia's - Amadu Diabarte & Jali Bakary Konteh www.bafila.bandcamp.com Your support keeps Africa's griot tradition alive... Cheers!
Written for BaseX 7.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery