diff --git a/.gitignore b/.gitignore index 1ffd740..7e2178e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ nbproject +/Tests/vendor/.composer/ +/Tests/vendor diff --git a/README.md b/README.md index 984c6f9..8875db0 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,49 @@ kind of data to expect. You can use XiSearchBundle with any searchengine as XiSearchBundle provides you interfaces that your final search data object structure must implement. +## Installing + +### deps -file +``` +[XiSearchBundle] + git=http://github.com/xi-project/xi-bundle-search.git + target=/bundles/Xi/Bundle/SearchBundle +``` + +### autoload.php file +```php + __DIR__.'/../vendor/bundles', +?> +``` + +### appKernel.php -file +```php + +``` + +### routing.yml -file +```yml +XiSearchBundle: + resource: "@XiSearchBundle/Resources/config/routing.yml" + prefix: / +``` + +### extend ajaxForm (from ajaxbundle) and make sure you bind your custom class as your ajax form handler (see ajaxbundle documentation) + +``` coffee +class App.AjaxForm.YourCustomClass extends App.AjaxForm.Default + + xiSearchResultCallback: (content) -> + @searchResult = $(@element).siblings('.search-result') + if !@searchResult.length + $(@element).after('
') + @searchResult = $(@element).siblings('.search-result') + + @searchResult.html(content) +``` ## Integration to ElasticSearch diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php new file mode 100644 index 0000000..ca1bbe1 --- /dev/null +++ b/Tests/bootstrap.php @@ -0,0 +1,16 @@ + + + + + + . + ./vendor + + +