While trying to change server from CF8 to CF10, this happened
In CF8 this was the search code
<cfsearch
collection="test_#arguments.cabinetid#"
status="docsearchstatus"
name="docsearch"
criteria='#arguments.filter#'
suggestions="Always"
contextpassages="1"
contextbytes="300"
>
In CF10 this I am using this.
<cfsearch collection="test_#arguments.cabinetid#"
status="docsearchstatus"
name="docsearch"
criteria='#lcase(arguments.filter)#*'
suggestions="Always"
contextPassages="1"
contextBytes="300"
>
Context filed in verity is longer and more descriptive. But while using solr most of times context is empty.
I tried making some changes on solr.xml and other solr config files. Here we add collections dynamically. So cannot fix this by changing the config files.
Have anyone come across this???
Result form verity searching
Result from SOLR searching
Solr doesn't populate context passages by default like Verity did. You need to tweak the config as described here in order to switch it on.
(Quoted from Adobe's help site in entirety, because they keep changing their URLs.)
To highlight contents in the entire document, modify the
solrconfig.xml
andschema.xml
files. These files are available in the following locations:
<Solr Home>/multicore/template/conf
: Modify files in this location to apply the changes to all future Solr collections. <Collection<Collection Directory>/conf
: Modify files in this location to apply the changes only to a particular collection.
Stop ColdFusion Add-on services.
Replace the following section in the
solrconfig.xml
, in the<requestHandler name="standard"
and<requestHandler name="dismax"
sections.<str name="hl.fl">summary title</str>
with
<str name="hl.fl">contents title</str>
Replace the following section in the
schema.xml
<field name="contents" type="text" indexed="true" stored="false" required="false" multiValued="true" omitNorms="true"/>
with
<field name="contents" type="text" indexed="true" stored="true" required="false" multiValued="true" omitNorms="true"/>
Restart Solr (i.e. the ColdFusion Add-on services).
Reindex the collection.
Note: The modifications to
solrconfig.xml
andschema.xml
will increase the index size.
Once these changes are made the context passages should start to display.