Searching with the inbuilt Lucene.net search engine

Introduction

The Roadkill search engine is powered by Lucene.net : http://incubator.apache.org/lucene.net/ . The index is updated each time a page is created or edited. Roadkill indexes the full content of the page along with the following fields:
  • id (the unique number each page is assigned)
  • content
  • title
  • tags
  • createdby (the username of the person who created the page)
  • createdon (the date the page was created)

The search engine displays the first 150 characters of each page's content to display in the search summary. When you search in the textbox, the content field is searched by default. You can restrict the page to certain fields using the usual syntax found on search engines like as Google. For example:
  • title:"my page"
  • tags:dotnet, vb createdby:editor

Index storage

Lucene stores index files for its search data in the App_Data/Search folder. The worker process/application pool will have rights to read and write from this folder by default, so there shouldn't be any issues with permissions providing the website root folder permissions are setup correctly.

The folder will contains 10 or more files in it, which Lucene may or may not contain file locks for while the site is running.

Common issues

Issues when a page is updated or created

Occasionally the Lucene index gets out of sync with the site from an error or other reason. This can also happen when a page is deleted - the whole index is updated when a page is created or deleted. If this happens you should login as the administrator for the site and head to Site settings->Tools and use the "Rebuild search index" option.

This is the best thing to do for any search related problems, as it 99% of the time it will resolve the issue you're having.

Last edited Jul 29, 2012 at 7:46 PM by mrshrinkray, version 6