[TYPO3-english] Re: Typo3 solr indexing

Siva Prasad sivaprasad.s at pitsolutions.com
Tue Apr 7 10:32:29 CEST 2015


HI 

Thanks for your reply.

Please see below for my solr configuration.


plugin.tx_solr.index.files.allowedTypes = au, bmp, doc, docx, epub, flv, gif, htm, html, jpg, jpeg, mid, mp3, msg, odf, odt, pdf, png, ppt, pptx, rtf, svg, sxw, tiff, txt, wav, xls, xlsx, xml
plugin.tx_solr.solr.scheme = http
plugin.tx_solr.solr.host = 127.0.0.1
plugin.tx_solr.solr.port = 8080
plugin.tx_solr.search.results.resultsPerPage = 10
plugin.tx_solr {
  enabled = 1
  templateFiles {
    commonTerms = fileadmin/folder/templates/solr/commonterms.htm
    search = fileadmin/folder/templates/solr/search.htm
    results = fileadmin/folder/templates/solr/results.htm
    moreLikeThis = fileadmin/folder/templates/solr/mlt.htm
  }
  cssFiles {
    results = fileadmin/folder/templates/solr/results.css
  }    
  addDefaultCss = 1
  addDefaultJs = 1
  enableDebugMode = 1
  general {
    dateFormat.date = d.m.Y H:i
  }
  index {
    enablePageIndexing = 1
    enableFileIndexing = 1
    files {
      allowedTypes = doc, docx, epub, htm, html, pdf, ppt, pptx, rtf, svg, sxw, txt, xls, xlsx
    }
    fieldProcessingInstructions {
      changed = timestampToIsoDate
      created = timestampToIsoDate
      endtime = timestampToIsoDate
    }    
    additionalFields {
        folder_section_stringS = TEXT
        folder_section_stringS.value = all
    }    
    queue {
      pages = 1
      tt_news = 0
      user_folderofficers_officer = 1
      user_folderofficers_officer {
      fields {
      	changed = tstamp
      	created = crdate
      	pid = pid
      	uid = uid
      	title = TEXT
      	title.value = IUFRO Officeholder {field:title} {field:fname} {field:lname}, {field:orge}
      	title.insertData = 1
        title_stringS = title
        fname_stringS = fname
        lname_stringS = lname
        orge_stringS = orge
        depte_stringS = depte
        street_stringS = street
        city_stringS = city
        ctry_stringS = ctry
        mail_stringS = mail
#       content = USER
#       content.includeLibs = EXT:user_folder/folder.php
#       content.userFunc = user_folder->getOfficersFunctions
        content = TEXT
        content.value = {field:depte} {field:inste} {field:orgc} {field:deptc} {field:instc} {field:site} {field:street} {field:pcode} {field:city} {field:prov} {field:zip} {field:ctry} {field:pmail} {field:mail}
        content.insertData = 1
        expert_stringS = expert
        url = TEXT
        url {
        	# 420 = Who is who > IUFRO Officeholders
                typolink.parameter = 420
                typolink.additionalParams = &user_folderofficers_pi1[uid]={field:uid}
                typolink.additionalParams.insertData = 1
                typolink.returnLast = url
        }
        folder_section_stringS = TEXT
        folder_section_stringS.value = whoiswho
    }
}
# ------
	user_folderevents_event = 1
	user_folderevents_event {
	fields {
		changed = tstamp
		created = crdate
		pid = pid
		uid = uid
		title = TEXT
		title.value = IUFRO Event: {field:title}, {field:city}
		title.insertData = 1  
		content = TEXT
		content.value = {field:organizer1} {field:organizer2} {field:organizer3} {field:organizer4} {field:unitnr1} {field:unitnr2} {field:unitnr3} {field:unitnr4} {field:unitnr5} {field:rss_description}
		content.insertData = 1  
		url = TEXT
		url {
			# 3311 = Events > Calendar of Meetings
			typolink.parameter = 3311
			typolink.returnLast = url
			}
		folder_section_stringS = TEXT
		folder_section_stringS.value = calendar
		}
	}	
    }
  }
  search {
    # TODO: move filter into query{}
    # filter =

    targetPage = {$PID_SOLR_RESULTS}

    allowEmptyQuery = 1

    query {
      fields = content^40.0, title^5.0, keywords^2.0, tagsH1^5.0, tagsH2H3^3.0, tagsH4H5H6^2.0, tagsInline^1.0

      # see http://wiki.apache.org/solr/DisMaxRequestHandler#mm_.28Minimum_.27Should.27_Match.29
      minimumMatch =

      # see http://wiki.apache.org/solr/DisMaxRequestHandler#bf_.28Boost_Functions.29
      boostFunction =

      # see http://wiki.apache.org/solr/DisMaxQParserPlugin#bq_.28Boost_Query.29
      boostQuery =
    }

    form = simple

    results {
      resultsHighlighting = 1
      resultsHighlighting {
         fragmentSize = 200
         wrap = <span class="results-highlight">|</span>
      }
    
      resultsPerPage = {$plugin.tx_solr.search.results.resultsPerPage}
      resultsPerPageSwitchOptions = 10, 20, 30, 50

      pagebrowser {
        # TODO move to top level templateFile options
        templateFile = fileadmin/folder/templates/solr/pagebrowser.htm
      }
      ignorePageBrowser = 0
      showDocumentScoreAnalysis = 0
    }

    highlighting = 1
    highlighting {
        # title and content are set as default in solrconfig.xml already
      highlightFields = title,content
      fragmentSize = 200
      wrap = <span class="results-highlight">|</span>
    }

    spellchecking = 1
    spellchecking {
      wrap = |<div class="spelling-suggestions">###LLL:didYouMean### |</div>|
    }

    lastSearches = 0
    commonTerms = 1

    sorting = 1
    sorting {
      defaultOrder = asc

      fields {
        sortAuthor = 1
        sortAuthor {
          label = sorting_author
        }
      }
    }

    faceting = 1
    faceting {
      minimumCount = 1
      sortBy = count
      limit = 10
      singleFacetMode = 0

      facetOrder = type, author, language
      facets {
        type {
          label = Content Type
          field = type
          missing = 0
        }

        author {
          label = Author
          field = sortAuthor
        }

        language {
          label = Sprache
          field = language
        }

      }
        // available place holders: @facetValue, @facetName, @facetText
      removeFacetLinkText = @facetText (remove)
      showAllLink.wrap = <li>|</li>
    }
  }

  statistics = 0

  suggest = 1
  suggest {
    loadJQuery = 1
    numberOfSuggestions = 10
    suggestField = spell
    forceHttps = 0
    stylesheet = EXT:solr/resources/css/jquery-ui/jquery-ui-1.8.2.custom.css
    javaScriptFiles {
      //library  = EXT:solr/resources/javascript/jquery-1.4.2.min.js
      //ui = EXT:solr/resources/javascript/jquery-ui-1.8.2.custom.min.js
      //suggest  = EXT:solr/resources/javascript/eid_suggest/suggest.js
      library >
      ui >
      suggest >
    }
  }

  # which components to show
  searchResultsViewComponents {
    faceting = 1
    sorting = 1
    commonTerms = 1
    lastSearches = 1
  }
  viewHelpers {
    crop {
      maxLength = 30
      cropIndicator = ...
    }
  }

  logging {
    exceptions = 1

      // TODO change "indexing" to enable all indexing logging, split up into several options
    indexing = 0
    indexing {
      indexQueuePageIndexerGetData = 0
    }

    query {
      filters = 0
      searchWords = 0
      queryString = 0
      rawPost = 0
      rawGet = 0
    }
  }
}

# Publications search
[PIDinRootline = 73]
plugin.tx_solr.index {
    additionalFields {
        folder_section_stringS = TEXT
        folder_section_stringS.value = publications
    }
}
[global]

# Who is who search
[PIDinRootline = 83]
plugin.tx_solr.index {
    additionalFields {
        folder_section_stringS = TEXT
        folder_section_stringS.value = whoiswho
    }
}
[global]

/* Commenting out code, breaks the search*/
[globalVar = GP:L = 1]
plugin.tx_solr.solr.path = /solr/core_de/
[end]

[globalVar = GP:L = 2]
plugin.tx_solr.solr.path = /solr/core_fr/
[end]

[globalVar = GP:L = 3]
plugin.tx_solr.solr.path = /solr/core_es/
[end]

[globalVar = GP:L = 0]
plugin.tx_solr.solr.path = /solr/core_en/
[end]


More information about the TYPO3-english mailing list