I'm having trouble getting the QueryParser to work. I'm implementing
Zend_Search_Lucene on a website and QueryParser should parse the input
string from a form field.





It parses the input to the following:





object(Zend_Search_Lucene_Search_Query_Boolean)[161]

  private '_subqueries' => 

    array

      0 => 

        object(Zend_Search_Lucene_Search_Query_Term)[166]

          private '_term' => 

            object(Zend_Search_Lucene_Index_Term)[164]

              public 'field' => string 'content' (length=7)

              public 'text' => string 'nyhed' (length=5)

          private '_docVector' => null

          private '_termFreqs' => null

          private '_boost' => float 1

          protected '_weight' => null

          private '_currentColorIndex' => int 0

          private '_highlightColors' => 

            array

              0 => string '#66ffff' (length=7)

              1 => string '#ff66ff' (length=7)

              2 => string '#ffff66' (length=7)

              3 => string '#ff8888' (length=7)

              4 => string '#88ff88' (length=7)

              5 => string '#8888ff' (length=7)

              6 => string '#88dddd' (length=7)

              7 => string '#dd88dd' (length=7)

              8 => string '#dddd88' (length=7)

              9 => string '#aaddff' (length=7)

              10 => string '#aaffdd' (length=7)

              11 => string '#ddaaff' (length=7)

              12 => string '#ddffaa' (length=7)

              13 => string '#ffaadd' (length=7)

              14 => string '#ffddaa' (length=7)

  private '_signs' => 

    array

      0 => null

  private '_resVector' => null

  private '_coord' => null

  private '_boost' => int 1

  protected '_weight' => null

  private '_currentColorIndex' => int 0

  private '_highlightColors' => 

    array

      0 => string '#66ffff' (length=7)

      1 => string '#ff66ff' (length=7)

      2 => string '#ffff66' (length=7)

      3 => string '#ff8888' (length=7)

      4 => string '#88ff88' (length=7)

      5 => string '#8888ff' (length=7)

      6 => string '#88dddd' (length=7)

      7 => string '#dd88dd' (length=7)

      8 => string '#dddd88' (length=7)

      9 => string '#aaddff' (length=7)

      10 => string '#aaffdd' (length=7)

      11 => string '#ddaaff' (length=7)

      12 => string '#ddffaa' (length=7)

      13 => string '#ffaadd' (length=7)

      14 => string '#ffddaa' (length=7)




In Zend_Search_Lucene::find($query) following is done:


$query = $query->rewrite($this)->optimize($this);





This returns an empty query. Now it holds the following data:





object(Zend_Search_Lucene_Search_Query_Empty)[169]
  private '_boost' => int 1
  protected '_weight' => null
  private '_currentColorIndex' => int 0
  private '_highlightColors' => 
    array
      0 => string '#66ffff' (length=7)
      1 => string '#ff66ff' (length=7)
      2 => string '#ffff66' (length=7)
      3 => string '#ff8888' (length=7)
      4 => string '#88ff88' (length=7)
      5 => string '#8888ff' (length=7)
      6 => string '#88dddd' (length=7)
      7 => string '#dd88dd' (length=7)
      8 => string '#dddd88' (length=7)
      9 => string '#aaddff' (length=7)
      10 => string '#aaffdd' (length=7)
      11 => string '#ddaaff' (length=7)
      12 => string '#ddffaa' (length=7)
      13 => string '#ffaadd' (length=7)
      14 => string '#ffddaa' (length=7)


This is apparantly due to the following content:



  private '_signs' => 

    array

      0 => null


Can anyone help to solve this problem? Or this a bug in Zend_Search_Lucene?

Also, indexing doubles up it's size on every run, because it can't search
for anything in the index, so it thinks every document is new.

Could there something wrong with my index? I've tried rebuilding it several
times.

 

I'm running the newest stable ZF 1.6.

 

 

// Søren

Reply via email to