up

Configuration

Create or copy the example SolisSearch.config from the download package into the config directory of your web application.

Section

SolrServer - Configures connection to Solr server

address
set address for Solr server. Will be used for both search and indexing if attribute indexingAddress below is not set.
indexingAddress
set alternate address to use when indexing data. E.g. in a load balanced Solr infrastructure, a specific instance can be set for receiveing all updates to the index. This attribute is optional.
username
your license username
licenseKey
your license key

SearchSettings - Configure settings for searching the index

defaultField
set default field for searching
enableLanguageSupport
set if site language should indexed and used when searching
enabledLanguages
set which language text fields that are enabled in Solr, e.g. if sv is set as enabled, searches on default field text will be on field text_sv. Remember to define these in schema.xml in your Solr instance.
highlight
boolean, set if search hit should be highlighted in content
highlightField
set which field that should be highlighted
fragmenter
set method to extract highlight from content
fragsize
set how many chararacters to return from highlighted content
indexroot
set which node to start indexing data from, normally startpage
defaultOperator
set which is the default operator on multiple search terms, AND or OR
richTextFileTypes
List of file extensions to add to index when found in content. Default value is txt,pdf,doc,docx,xls,xlsx,ppt,pptx

Languages - configure your languages on your site

name
language name in two letter iso-standard format, e.g. en,sv,it
rootNode
root node for language in content tree

DocTypes - defines how properties should be indexed

name
define for each doctype alias or use "default" as fallback
exclude
if true, the doctype will never be indexed
addPageNameToContent
if true, the page name will be searchable content. Useful when there is no explicit property for page title on the doctype
Properties section - defines each property
name
Unique name for definition
property
property name
type
set type for property, text, string, date or relatedLinks
content
set if property should be indexed as part of the content of page
striphtml
set wether to remove html-tags or not before indexing data
recursive
defines if the property value should be retrieved from ancestor nodes if not set on page explicit.
forcemultivalued
set if proterty valued should be stored as array in index, must be used with attribute "splitchar"
splitchar
defines which characted to split property on if forcemultivlaued is set to true.
alphabeticalindex
set if property value should stored for alphabetical index, meaning first letter of property value will be stored separately to enable single letter search
parser
implement your own custom property parser by implementing the SolisSearch.Interfaces.IPropertyParser interface and define here with full class name and assembly name.See relatedLinks property in SolisSearch.config example above
boost
boost property value to be more relevant in search

Facets

type
type of facet, value or range
field
set which field to return facets from
mincount
set minimum count for facet to be returned
limit
set maximum number of facets to return
sort
set if facet should be sorted
start
range facets start value
end
range facets end value
dynamic
set dynamic keyword the create dynamic ranges for dates, supported keywords are thisday, thisweek, thismonth, thisyear and last. Keyword last requires attribute gap set as well to know how many days that should be received
gap
set the gap for each facet in a range facet, or when using dynamic "last"

Example SolisSearch.config

<?xml version="1.0"?>
<SolisSearch>
  <SolrServer address="http://localhost:8983/solr" username="YOUR DOMAINNAME" licenseKey="LICENCEKEY" />
  <SearchSettings defaultField="text" enableLanguageSupport="true" enabledLanguages="sv" highlight="true" highlightFields="content" fragmenter="regex" fragsize="300" defaultOperator="AND" />
  <Languages>
    <Language name="en" rootNode="1090" />
  </Languages> 
  <DocTypes>
    <DocType name="default">
      <Properties>
        <Property name="p4" property="bodyText" type="text" content="true" striphtml="true" />
        <Property name="p8" property="relatedLinks" type="relatedLinks" parser="SolisSearch.Parsers.RelatedLinksParser,SolisSearch" />
      </Properties>
    </DocType>
    <DocType name="umbHomepage" exclude="true" >
      <Properties>
        <Property name="p1" property="bodyText" type="text" content="true" striphtml="true" />
        <Property name="p2" property="siteName" type="string" />
        <Property name="p3" property="siteDescription" type="text" />
      </Properties>
    </DocType>
  </DocTypes>
  <Facets>
    <Facet type="value" field="name" mincount="0" limit="-1" sort="false" />
    <Facet type="range" field="last_modified" mincount="1">
      <Ranges>
      <FacetRange name="date3" dynamic="thisday" dataType="date" />  
      <FacetRange name="date4" dynamic="thisweek" dataType="date" />
      <FacetRange name="date5" dynamic="thismonth" dataType="date" />
      <FacetRange name="date6" dynamic="thisyear" dataType="date" />
      <FacetRange name="date7" dynamic="last" gap="20" dataType="date" />
       </Ranges>
    </Facet>
    <Facet type="range" field="id" mincount="-1">
      <Ranges>
        <FacetRange name="int1" start="1" end="2000" dataType="int" gap="100" />
      </Ranges>
    </Facet>
  </Facets>
</SolisSearch>