Menu

Dynamic fields

This page is generated by Machine Translation from Japanese.

Dynamic field of SOLR

SOLR is document items (fields) for each to the schema defined in order to register. Available in Fess Solr schema is defined in solr/core1/conf/schema.xml. dynamic fields and standard fields such as title and content can be freely defined field names are defined. Advanced parameter values see a Solr document.

How to use the

I think scenes using the dynamic field of many, in database scrawl’s, such as registering in datastore crawl settings. How to register dynamic fields in database scrawl by placing the script other_t = hoge hoge column data into Solr other_t field.

You need to add a field to use to retrieve data that is stored in the dynamic field next to the webapps/fess/WEB-INF/classes/app.dicon. Add the other_t.

<component name="queryHelper" class="jp.sf.fess.helper.impl.QueryHelperImpl">
    <property name="searchFields">new String[]{"url", "host", "site",
        "title", "content", "contentLength", "lastModified", "mimetype",
        "label", "segment", "other_t" }</property>
</component>

You must add a field to use to retrieve data that is stored in the dynamic field from Solr. Add the other_t.

<component name="queryHelper" class="jp.sf.fess.helper.impl.QueryHelperImpl">
   <property name="responseFields">new String[]{"id", "score", "boost",
        "contentLength", "host", "site", "lastModified", "mimetype",
        "tstamp", "title", "digest", "url", "other_t" }</property>
</component>

Edit the JSP file has made returns from Solr in the above settings, so to display on the page. Login to the manage screen, displays the design. Display of search results the search results displayed on the page (the content), so edit the JSP file. where you want to display the other_t value in $ {f:h(doc.other_t)} and you can display the value registered in.