title: Laravel - Lucene Search
body: <p>Might be very specific to the package this. Or hopefully someone can help.</p>
  
  <p>I am using this Composer Package - <a href="https://github.com/nqxcode/laravel-lucene-search" rel="nofollow">https://github.com/nqxcode/laravel-lucene-search</a></p>
  
  <p>I have followed the install instructions (I feel)...</p>
  
  <p>I have set the config up as follows :</p>
  
  <pre><code>'index' =&gt; [
  
          'path' =&gt; storage_path() . '/lucene-search/index',
  
          'models' =&gt; [
              // Add models descriptions here.
              'Pack' =&gt; [
                  'fields' =&gt; [
                      'pack_title','pack_description',
                  ]
              ]
          ],
      ],
  </code></pre>
  
  <p>Inside my "Pack" model. I have the following...</p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Database\Eloquent\Model;
  use Nqxcode\LuceneSearch\Model\Searchable;
  
  class Pack extends Model implements Searchable {
  
      public function isSearchable()
      {
          return $this-&gt;publish;
      }
  
      // Add your validation rules here
      public static $rules = [
          'pack_title' =&gt; 'required',
          'pack_description' =&gt; 'required',
          'primary_category_id' =&gt; 'required',
          'keystage'  =&gt; 'required',
          'pack_unit_price' =&gt; 'required'
      ];
  
      protected $primaryKey = "pack_id";
  
      // Don't forget to fill this array
      //protected $fillable = [];
  
      use SoftDeletingTrait;
  
      protected $dates = ['deleted_at'];
  </code></pre>
  
  <p>I have then created a "SearchesController"</p>
  
  <p>It looks like this...</p>
  
  <pre><code>&lt;?php
  
  class SearchesController extends \BaseController {
  
      /**
       * Display a listing of the resource.
       * GET /search
       *
       * @return Response
       */
      public function index()
      {
          //
          $query = Search::query('A New Pack Title'); // search by 'name' field.
  
          $models = $query-&gt;get();
  
          var_dump(DB::getQueryLog());
  
          $count = $query-&gt;count();
      }
  </code></pre>
  
  <p>My var_dump shows this...</p>
  
  <pre><code>array(2) { [0]=&gt; array(3) { ["query"]=&gt; string(56) "select * from `categories` order by `category_order` asc" ["bindings"]=&gt; array(0) { } ["time"]=&gt; float(1.26) } [1]=&gt; array(3) { ["query"]=&gt; string(90) "select * from `packs` where `packs`.`deleted_at` is null and `packs`.`pack_id` = ? limit 1" ["bindings"]=&gt; array(1) { [0]=&gt; string(0) "" } ["time"]=&gt; float(0.59) } } 
  </code></pre>
  
  <p>It just feels like it is not doing a search within the Packs model. Or a non significant one.</p>
  
  <p>Am I doing something glaringly wrong. Hopefully one of you guys can help</p>
  
  <p>Cheers</p>