Title: Solr for WordPress
Author: mattweber
Published: <strong>2009年4月21日</strong>
Last modified: 2011年12月13日

---

プラグインを検索

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

![](https://s.w.org/plugins/geopattern-icon/solr-for-wordpress.svg)

# Solr for WordPress

 作者: [mattweber](https://profiles.wordpress.org/mattweber/)

[ダウンロード](https://downloads.wordpress.org/plugin/solr-for-wordpress.0.5.1.zip)

 * [詳細](https://ja.wordpress.org/plugins/solr-for-wordpress/#description)
 * [レビュー](https://ja.wordpress.org/plugins/solr-for-wordpress/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/solr-for-wordpress/#installation)
 * [開発](https://ja.wordpress.org/plugins/solr-for-wordpress/#developers)

 [サポート](https://wordpress.org/support/plugin/solr-for-wordpress/)

## 説明

A WordPress plugin that replaces the default WordPress search with Solr. Features
include:

 * Index pages and posts
 * Enable faceting on fields such as tags, categories, author, and page type.
 * Indexing and faceting on custom fields
 * Multisite support
 * Treat the category facet as a taxonomy
 * Add special template tags so you can create your own custom result pages to match
   your theme.
 * Completely replaces default WordPress search, just install and configure.
 * Completely integrated into default WordPress theme and search widget.
 * Configuration options allow you to select pages to ignore, features to enable/
   disable, and what type of result information you want output.
 * i18n Support
 * Multi server/core support
 * Note that this plugin requires you to have an instance of Solr using a schema
   with the following fields: id, permalink, title, content, numcomments, categories,
   categoriessrch, tags, tagssrch, author, type, and text. The facet fields (categories,
   tags, author, and type) should be string fields. You can make tagssrch and categoriessrch
   of any type you want as they are used for general searching. The plugin is distributed
   with a Solr schema you can use at `solr-for-wordpress/schema.xml`.

### Credits

Dominique Bejean for custom field support and testing.
 Eric Pugh multi server support.
Dustin Rue – fixes for batch import and multisite.

## スクリーンショット

[⌊Configuration Page⌉⌊Configuration Page⌉[

Configuration Page

[⌊Example of results page in default WordPress Theme⌉⌊Example of results page in
default WordPress Theme⌉[

Example of results page in default WordPress Theme

## インストール

 1. Upload the `solr-for-wordpress` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Configure the plugin with the hostname, port, and URI path to your Solr installation.
 4. Load all your posts and/or pages via the “Load All Posts” button in the settings
    page.

#### Custom Theme Integration

 1. Create a new theme file called “s4w_search.php”.
 2. Insert your markup, use template methods s4w_search_form() and s4w_search_results()
    to insert the search box and results respectively.
 3. Add result styling to your theme css file, see `solr-for-wordpress/template/search.
    css` for an example.
 4. You can use the search widget in your sidebar for search, or use a custom search
    box that submits the query in the parameter “s”.

## FAQ

  What version of WordPress does Solr for WordPress work with?

Solr for WordPress works with WordPress 3.0 and greater.

  What version of Solr is required.

Solr 1.4 or greater.

  Can I enable/disable specific facets.

Yes, from the settings page. Uncheck the “Facet on FIELD” option, for the FIELD 
you don’t want a facet for.

  Do I need to run my own Solr server to use this plugin?

No, there are Solr hosting providers that will setup and manager Solr for you. As
long as they allow custom schema’s and support the
 standard Solr http api, then
the plugin should work. Some sites:

http://www.mysolrserver.com/
 http://www.websolr.com/ http://powcloud.com/

  Can I run a local instance of Solr for testing?

Yes, you may grab a copy from the apache website: http://www.apache.org/dist/lucene/
solr/
 Since it runs on java solr is platform independent, just make sure you have
java install So go ahead and Download the .tgz/.zip file (there is no difference).
1) Extract the files you have downloaded 2) Copy the schema file (schema.xml) from
this plugin to the folder you extracted ‘apache-solr-_/examples/solr/conf/’ (yes
overwrite the file there) 3) Open up terminal and then go to where you extracted
the files and inside ‘./apache-solr-/examples’ run the command “java -jar start.
jar”

For any further information please the README that comes with solr.

  What is a taxonomy

A taxonomy is a hierarchal facet. This means that your subcategories will be treated
as a child to the parent category instead of an individual facet.

Here is what an example category taxonomy look like:

    ```
    -States
    ---California
    ------Los Angeles
    ---New York
    ------New York
    ```

Here is that same category not treating it as a taxonomy:

    ```
    -States
    -California
    -Los Angeles
    -New York
    -New York
    ```

As you can see, treating it as a taxonomy is much better.

  I was treating the category as a taxonomy disabled it, now my category facet looks
weird

You need to delete and re-index your data.

  How do I know what html tags to style in my custom theme

See `solr-for-wordpress/template/search.css` for an example, or view the source 
of the search results.

  Can I create a custom search page such as http://www.myblog.com/search/?

Yes, it is fairly trivial as well. Follow the steps for custom theme integration.
At the top of that page, insert a comment similar to the following:

Login to the WordPress admin GUI, select add new page, set the title of the page
to “Search”. On the right hand side you will see a drop-down box that says “Template”,
click that and select “Search”. Leave the content of the page blank and publish 
the page.

You will have have your “/search/” page.

  I need the output of this plugin in a different language

Solr for WordPress is internationalized. There is supplied .pot file that you can
use for translations. See https://codex.wordpress.org/Translating_WordPress for 
more details.

  How do I find out the page or post id to exclude?

Login to the WordPress admin, select pages, click the page you want to exclude. 
The post id is what you are looking for, you can find it in the titlebar as the &
post= parameter. In this example, the page id is 22, http://www.yourblog.com/wp-
admin/page.php?action=edit&post=22.

## 評価

このプラグインにはレビューがありません。

## 貢献者と開発者

Solr for WordPress はオープンソースソフトウェアです。以下の人々がこのプラグインに
貢献しています。

貢献者

 *   [ mattweber ](https://profiles.wordpress.org/mattweber/)

[“Solr for WordPress” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/solr-for-wordpress)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/solr-for-wordpress/)する
か、[SVN リポジトリ](https://plugins.svn.wordpress.org/solr-for-wordpress/)をチェック
するか、[開発ログ](https://plugins.trac.wordpress.org/log/solr-for-wordpress/)を
[RSS](https://plugins.trac.wordpress.org/log/solr-for-wordpress/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## メタ

 *  バージョン **0.5.1**
 *  最終更新日 **15年前**
 *  有効インストール数 **10+**
 *  WordPress バージョン ** 3.0またはそれ以降 **
 *  検証済み最新バージョン: **3.2.1**
 *  言語
 * [English (US)](https://wordpress.org/plugins/solr-for-wordpress/)
 * タグ
 * [custom search](https://ja.wordpress.org/plugins/tags/custom-search/)[search](https://ja.wordpress.org/plugins/tags/search/)
   [search integration](https://ja.wordpress.org/plugins/tags/search-integration/)
   [search results](https://ja.wordpress.org/plugins/tags/search-results/)[solr](https://ja.wordpress.org/plugins/tags/solr/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/solr-for-wordpress/advanced/)

## 評価

レビューはまだ送信されていません。

[Your review](https://wordpress.org/support/plugin/solr-for-wordpress/reviews/#new-post)

[すべてのレビューを見る](https://wordpress.org/support/plugin/solr-for-wordpress/reviews/)

## 貢献者

 *   [ mattweber ](https://profiles.wordpress.org/mattweber/)

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/solr-for-wordpress/)

## 寄付

このプラグインが今後も改善できるよう応援しませんか ?

 [ このプラグインに寄付 ](http://www.mattweber.org)