Anura offers faceted search since version 2.6. In order for this to work, you'll need to add the anuraSolr-{version}.jar to {home}/appserver/lib
and configure your SOLR server accordingly. Anura requires an extra index per referenced CELUM user, as permissions are not reflected in the search index, so we have to maintain a separate index per user that reflects what that user can see.
AnuraSolr | Anura | CELUM 6 | CELUM 5.13.x | CELUM 5.12.x |
---|---|---|---|---|
1.0 - 1.4 | 2.5 - 2.6.13 | 5.13.0 - 5.13.3 | 5.12.3 (+) | |
1.0 - 1.4 | 2.6.14 - 2.7.6 | 5.13.3 | ||
1.5 | 2.7.9 and above | 5.13.4 (+) | ||
1.6 | 2.8.0 and above | 6.1 (+) | - | - |
1.6.1 and above | 2.8.1 and above | 6.4 (+) | - | - |
1.7 and above | 2.9 | 6.8 (+) | - | - |
Make sure the directory is writable by the tomcat user, otherwise the indexing will fail later on
CELUM 5.13.4 onwards or whenever the data directory is not inside the solrhome directory: Change the dataDir
property in the copied assetsAnura{userId}/conf/solrconfig.xml to <dataDir>${solr.assetsAnura{userId}.data.dir:}</dataDir>
(e.g. <dataDir>${solr.assetsAnura42.data.dir:}</dataDir>
)
Next, the file assetsAnura{userId}/core.properties must be adjusted as follows: name = assetsAnura{userId}
Depending on the age of you conf/schema.xml, you may need to add
docValues="true"
to certain fields (observed withdate
andtdate
on line 130+), otherwise you get a Can't facet on a Point Field without docValues<fieldType name="date" class="solr.DatePointField" positionIncrementGap="0" sortMissingLast="true" docValues="true"/> <fieldType name="tdate" class="solr.DatePointField" positionIncrementGap="0" sortMissingLast="true" docValues="true" />
CELUM 5.13.3 and before: Add your new core to the solr.xml file (you can copy the assets line here as well)
<cores adminPath="/admin/cores">
<core name="assets" instanceDir="assets" />
<core name="assetsAnura42" instanceDir="assetsAnura42" /> <!-- this -->
<core name="containers" instanceDir="containers" />
<core name="tasks" instanceDir="tasks" />
<core name="processInstances" instanceDir="processInstances" />
</cores>
If you have customized the data directory of your asset core, e.g. by specifying -Dsolr.assets.data.dir=..., you'll need to change the dataDir property in the copied assetsAnura{userId}/conf/solrconfig.xml to something else, e.g.
<dataDir>${solr.assetsAnura42.data.dir:}</dataDir>
so you could pass -Dsolr.assetsAnura42.data.dir=... - otherwise it tries to write to the existing asset core data directory and fails.
anura.1.facetProvider=anuraSolrSearchRequestHandler
) and restart the app server.facets: true
in anuraSearchTo be configured in {home}/appserver/conf/custom.properties
type: String, required: yes, default: ${search.serverUrl}
The URL of the SOLR server. Defaults to the one CELUM is using.
type: boolean, required: yes, default: ${search.enableLeadingWildcardSearch}
Whether to use leading wildcard search. This must match the settings you use in CELUM, so the default is ${search.enableLeadingWildcardSearch}
type: boolean, required: no, default: true
Set this property to true, to use the SDK for fulltext search.
type: boolean, required: no, default: -1
Set this property to another value 'x' to get only top 'x' facet result per faceted field. Not recommendet.
type: boolean, required: no, default: false, status: beta
When using globalFilter, translate the filter into a SOLR native query instead of using the SDK. This is a lot faster, but not every query is supported yet. Known supported queries: and, or, asset type, checkbox, dropdown, node assignments. Contact us if you need more ^^
type: String , required: no, default: -
A cron expression (quartz) to run the recreation task automatically, e.g. 0 0 0 * * ?
for midnight.
type: String, required: no, default: 0 0 0 ?, since: 1.7
A cron expression (quartz) to run the cleanup task, i.e. remove expired assets from the index.
type: int , required: no, default: 10
Size of the threadpool to run the re-indexing with.
type: int , required: no, default: 200
The fetch-size used then re-indexing.
When you get either no results or all the faceted options get removed instantly after loading the page, check:
dataDir
(see above)dataDir
is not writable to the SOLR userdocValues
(see above)*:*
and hit Execute Query. Response should return a numFound
> 0. If not, check the Anura: recreate facets tasks (or the log) for error messages.nodeBackedPathIds_360:*
and see if you get any results (depending on the field type the key will be different, e.g. customFields_<type>_<id>
. If the query yields no results, double-check the users permissions and re-index.In your anura core's conf/schema.xml, remove the following line:
<filter class="solr.ReversedWildcardFilterFactory"/>
... and recreate the search index.
© brix IT Solutions