Changeset 1045 for MDRepository/trunk/xquery/README
- Timestamp:
- 01/09/11 20:28:15 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MDRepository/trunk/xquery/README
r958 r1045 12 12 c) set admin pwd 13 13 14 ...? 14 d) you may want to add memory to the JVM 15 under bin/functions.d/eXist-settings.sh#set_java_options() 16 17 e) you may also want to grow the cache in conf.xml 18 <db-connection cacheSize="48M" collectionCache="24M" database="native" 19 where @cacheSize could be around 512M 20 and @collectionCache should be around one third of the @cacheSize 21 15 22 16 23 1. add scripts to: /db/clarin … … 18 25 + cmd-model.xqm has all the logic 19 26 + cmd-model.xql is the script being called as the interface 20 +cmd-stats.xql is meant for testing purposes, but not integrated yet21 +init-cache.xql is meant for refreshing the cache with some long-running (resource-intensive) queries, meant to run once upon dataset change27 (+) cmd-stats.xql is meant for testing purposes, but not integrated yet 28 (+) init-cache.xql is meant for refreshing the cache with some long-running (resource-intensive) queries, meant to run once upon dataset change 22 29 23 2. add data to /db/cmdi-mirror24 (the file-system structure will be reflected in the "collection"-structure within exist,25 however this is irrelevant for the MDRepository methods.26 Those rely on the linking via handles in MdSelfLink/ResourceRef and IsPartOf elements of the MDRecords.27 The handles in IsPartOf are redundant (necessary for faster collection-constraint search)28 and can be derived from the ResourceRef/MdSelfLink link.29 This can be done before storing the data in the repository,30 or after the import directly in the repository (scripts for this will be available soon)31 30 32 3. add a clarin-user in /db/system/users.xml31 2. add a clarin-user in /db/system/users.xml 33 32 (needed for writing into the cache) 34 33 + /db/clarin/writer.xml with given user, like this: … … 39 38 40 39 41 4. create a collection for caching,42 eg: /db/c ommon/clarin/freqs40 3. create a collection for caching, 41 eg: /db/cache 43 42 this has to correspond to the entry in cmd-model.xqm: 44 declare variable $cmd-model:commonFreqsPath as xs:string := "/db/c ommon/clarin/freqs";43 declare variable $cmd-model:commonFreqsPath as xs:string := "/db/cache"; 45 44 46 45 If you change something, you have to manually clear the cache-collection. … … 50 49 for getCollections: collection{maxdepth}-{hash({collection-handle})} 51 50 for queryModel: values{maxdepth}-{hash({simple xpath from q-param})} 51 52 52 53 5. depending on your server-setup you should be able to get your first query under somewhere like: 53 4. define indices 54 copy cmdi-mirror.xconf into /db/system/config/db/cmdi-mirror 55 56 57 5. add data to /db/cmdi-mirror 58 (the file-system structure will be reflected in the "collection"-structure within exist, 59 however this is irrelevant for the MDRepository methods. 60 Those rely on the linking via handles in MdSelfLink/ResourceRef and <IsPartOf> elements of the MDRecords. 61 The handles in <IsPartOf> are redundant (necessary for faster collection-constraint search) 62 and can be derived from the ResourceRef/MdSelfLink link. 63 This can be done before storing the data in the repository, 64 or after the import directly in the repository (XUpdate-scripts for this will be available soon) 65 66 The top level collection record is by convention called colleciton_root.cmdi 67 and is marked with: <IsPartOf>root</IsPartOf> 68 (So every dataset (olac, lrt, imdi) has one such MDRecord.) 69 70 6. depending on your server-setup (port) you should be able to get your first query under somewhere like: 54 71 55 72 http://localhost:8680/exist/rest/db/clarin/cmd-model.xql?q=Components … … 61 78 Avoid starting multiple times. 62 79 You can see in the cache-collection, if the results are ready. 63 80 81 64 82 65 83 == test suite ==
Note: See TracChangeset
for help on using the changeset viewer.