Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[README and LICENSE]

  • Loading branch information...
commit 53965ac304437716944445e491d4313269e302f9 1 parent fa57760
@nibsirahsieu authored
Showing with 58 additions and 0 deletions.
  1. +7 −0 LICENSE
  2. +51 −0 README
View
7 LICENSE
@@ -0,0 +1,7 @@
+Copyright (c) 2010 Nibsirahsieu
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
51 README
@@ -0,0 +1,51 @@
+# sfLuceneable15BehaviorPlugin #
+==============================
+
+The `sfLuceneable15BehaviorPlugin` is a symfony plugin that enabled the model(s) to be searchable. This plugin use sfPropel15Plugin as an ORM.
+
+## Installation ##
+ * Install the plugin
+
+ git clone git://github.com/nibsirahsieu/sfLuceneable15BehaviorPlugin.git
+
+ * Activate the plugin in the `config/ProjectConfiguration.class.php`
+
+ [php]
+ class ProjectConfiguration extends sfProjectConfiguration
+ {
+ public function setup()
+ {
+ ...
+ $this->enablePlugins('sfLuceneable15BehaviorPlugin');
+ ...
+ }
+ }
+
+## How to use ##
+ * Example:
+
+ [xml]
+ <table name="section">
+ <column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
+ <column name="title" type="VARCHAR" required="true" primaryString="true" />
+ <column name="content" type="LONGVARCHAR" required="true" />
+ <behavior name="luceneable" />
+ </table>
+
+ if you don't supply the parameter values, the behavior will index all columns using `UnStored` method except the primary key (primary key will be indexed Using `Keyword` method).
+
+ * Customizing behavior (Note: the parameter for primary key will be ignored, and its will indexed using `Keyword` method)
+
+ [xml]
+ <table name="section">
+ <column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
+ <column name="title" type="VARCHAR" required="true" primaryString="true" />
+ <column name="content" type="LONGVARCHAR" required="true" />
+ <behavior name="luceneable" >
+ <parameter name='title' value='text' />
+ <parameter name='content' value='unstored' />
+ </behavior>
+ </table>
+
+## How to Search ##
+ * $activeRecords = sfPropelLuceneSearch::create($query)->in($model)->find();
Please sign in to comment.
Something went wrong with that request. Please try again.