Unitialized string offset

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unitialized string offset

gherson
hi,

"Do not use networked file systems with Zend_Search_Lucene" period end of paragraph (a new addition to http://framework.zend.com/manual/en/zend.search.lucene.index-creation.html#zend.search.lucene.index-creation.limitations.filesystems).  Why are no networked file systems safe?  Flock() isn't safe with Apache if the indexes are on a Windows Network?

Perhaps not--I just searched for "test", got "error [8] Uninitialized string offset:  0 on line 161 in file C:\xampplite\php\zf\Zend\Search\Lucene\Storage\File.php", searched for "design", got a few hits, searched for "test" again, and it worked without error.  We're using ZSL in production and it's not working smooth enough...

What should my error_reporting() be set to when using ZSL?  E_ERROR?

What's the best way to test a Lucene index for corruption?  Are detection and repair utilities for this in development (pls) ?

http://framework.zend.com/manual/en/zend.search.lucene.best-practice.html#zend.search.lucene.best-practice.maintenance has:
    "If index corruption occures [sic] for any reason, the corrupted index should be restored or completely rebuilt.
    "So it's a good idea to backup large indexes and store changelogs to perform manual restoration and roll-forward operations if necessary."
How does one create a changelog that allows rolling Lucene forward?

What are the ZSL changes in ZF1.6?  I tried searching but
http://framework.zend.com/search?query=release+notes&language=en&type=all&x=0&y=0 currently returns "HTTP 500 - Internal server error".

thanks alot,
george herson
Reply | Threaded
Open this post in threaded view
|

Re: Unitialized string offset

gherson
gherson wrote
What should my error_reporting() be set to when using ZSL?  E_ERROR?
Yes.  Avoid "Uninitialized string offset:  389 on line 116 in file C:\xampplite\php\zf\Zend\Search\Lucene\Index\DictionaryLoader.php"-type (search-stopping) errors in Zend Framework 1.6 by either
1.  Adding
    $pos = min(strlen($data)-1, $pos); // new
above all instances of
    $nbyte = ord($data[$pos++]);
in Zend\Search\Lucene\Index\DictionaryLoader.php (Zend: do this please)

or

2. Quash E_NOTICE errors:
error_reporting(E_ALL ^ E_NOTICE);

fyi,
George
Reply | Threaded
Open this post in threaded view
|

RE: Unitialized string offset

Alexander Veremyev
Hi George,

The problem is not in the DictionaryLoader. It's in the SegmentWriter
(http://framework.zend.com/issues/browse/ZF-4365).

It's already fixed for ZF 1.6.2, but you have to rebuild your indices.
(Adding new documents with a followed index optimization also solves
problem).


With best regards,
   Alexander Veremyev.

> -----Original Message-----
> From: gherson [mailto:[hidden email]]
> Sent: Saturday, November 01, 2008 12:04 AM
> To: [hidden email]
> Subject: Re: [fw-formats] Unitialized string offset
>
>
>
> gherson wrote:
> >
> > What should my error_reporting() be set to when using ZSL?  E_ERROR?
> >
> Yes.  Avoid "Uninitialized string offset:  389 on line 116 in file
>
C:\xampplite\php\zf\Zend\Search\Lucene\Index\DictionaryLoader.php"-type
> (search-stopping) errors in Zend Framework 1.6 by either
> 1.  Adding
>     $pos = min(strlen($data)-1, $pos); // new
> above all instances of
>     $nbyte = ord($data[$pos++]);
> in Zend\Search\Lucene\Index\DictionaryLoader.php (Zend: do this
please)

>
> or
>
> 2. Quash E_NOTICE errors:
> error_reporting(E_ALL ^ E_NOTICE);
>
> fyi,
> George
>
> --
> View this message in context:
http://www.nabble.com/Unitialized-string-
> offset-tp19414579p20273990.html
> Sent from the Zend MFS mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

RE: Unitialized string offset

gherson
Thanks, Alexander, very good to know.

What QA do you put new Zend_Lucene releases thru?  I was easily getting many instances of the aforementioned error right away by indexing on the order of a few hundred documents.  

Sincerely,
George

Alexander Veremyev wrote
Hi George,

The problem is not in the DictionaryLoader. It's in the SegmentWriter
(http://framework.zend.com/issues/browse/ZF-4365).

It's already fixed for ZF 1.6.2, but you have to rebuild your indices.
(Adding new documents with a followed index optimization also solves
problem).


With best regards,
   Alexander Veremyev.