Discussion:
Zend_Search_Lucene + index.lock problem
dinok
2007-08-26 11:25:32 UTC
Permalink
Hi guys,
I'm trying to index some small data with Zend_Search_Lucene, but it doesn't
work :(
So the source.php:
$index = new Zend_Search_Lucene('one', true);
$doc = new Zend_Search_Lucene_Document();
$doc->addField(Zend_Search_Lucene_Field::UnIndexed('link', 'link'));
$doc->addField(Zend_Search_Lucene_Field::Text('title', 'title'));
$doc->addField(Zend_Search_Lucene_Field::Text('contents', 'content'));
echo "Adding test......\n";
$index->addDocument($doc);
$index->commit();

First error:
Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message
'File 'one/segments_1' is not readable.' in...

After I refreshed the page:
Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message
'File 'one/index.lock' is not readable.'

The folder 'one' is correctly created and it contains the following files:
_0.cfs
deletable
segments
write.lock

When I create an empty file named 'index.lock', everything works fine...
System is WinXP SP 2.

Best regards,
Dino
--
View this message in context: http://www.nabble.com/Zend_Search_Lucene-%2B-index.lock-problem-tf4330822s16154.html#a12334061
Sent from the Zend MFS mailing list archive at Nabble.com.
Alexander Veremyev
2007-08-26 19:07:56 UTC
Permalink
Hi Dino,

That looks like you use current SVN version of ZF or some of the latest
snapshots and not long ago committed Lucene v2.1 index format support
(r/o mode) has problems with index.lock file.
I'll check it. Please try ZF 1.0.1 before that.

With best regards,
Alexander Veremyev.
-----Original Message-----
Sent: Sunday, August 26, 2007 3:26 PM
Subject: [fw-formats] Zend_Search_Lucene + index.lock problem
Hi guys,
I'm trying to index some small data with Zend_Search_Lucene,
$index = new Zend_Search_Lucene('one', true); $doc = new
Zend_Search_Lucene_Document();
$doc->addField(Zend_Search_Lucene_Field::UnIndexed('link',
'link'));
$doc->addField(Zend_Search_Lucene_Field::Text('title',
'title'));
$doc->addField(Zend_Search_Lucene_Field::Text('contents',
'content')); echo "Adding test......\n";
$index->addDocument($doc); $index->commit();
Fatal error: Uncaught exception
'Zend_Search_Lucene_Exception' with message 'File
'one/segments_1' is not readable.' in...
Fatal error: Uncaught exception
'Zend_Search_Lucene_Exception' with message 'File
'one/index.lock' is not readable.'
The folder 'one' is correctly created and it contains the
_0.cfs
deletable
segments
write.lock
When I create an empty file named 'index.lock', everything
works fine...
System is WinXP SP 2.
Best regards,
Dino
--
http://www.nabble.com/Zend_Search_Lucene-%2B-index.lock-proble
m-tf4330822s16154.html#a12334061
Sent from the Zend MFS mailing list archive at Nabble.com.
Alexander Veremyev
2007-08-27 19:25:20 UTC
Permalink
PS Just fixed this in the SVN.

With best regards,
Alexander Veremyev.
-----Original Message-----
Sent: Sunday, August 26, 2007 11:08 PM
Subject: RE: [fw-formats] Zend_Search_Lucene + index.lock problem
Hi Dino,
That looks like you use current SVN version of ZF or some of
the latest snapshots and not long ago committed Lucene v2.1
index format support (r/o mode) has problems with index.lock file.
I'll check it. Please try ZF 1.0.1 before that.
With best regards,
Alexander Veremyev.
-----Original Message-----
Sent: Sunday, August 26, 2007 3:26 PM
Subject: [fw-formats] Zend_Search_Lucene + index.lock problem
Hi guys,
I'm trying to index some small data with Zend_Search_Lucene, but it
$index = new Zend_Search_Lucene('one', true); $doc = new
Zend_Search_Lucene_Document();
$doc->addField(Zend_Search_Lucene_Field::UnIndexed('link',
'link'));
$doc->addField(Zend_Search_Lucene_Field::Text('title',
'title'));
$doc->addField(Zend_Search_Lucene_Field::Text('contents',
'content')); echo "Adding test......\n"; $index->addDocument($doc);
$index->commit();
Fatal error: Uncaught exception
'Zend_Search_Lucene_Exception' with message 'File
'one/segments_1' is
not readable.' in...
Fatal error: Uncaught exception
'Zend_Search_Lucene_Exception' with message 'File
'one/index.lock' is
not readable.'
The folder 'one' is correctly created and it contains the following
_0.cfs
deletable
segments
write.lock
When I create an empty file named 'index.lock', everything works
fine...
System is WinXP SP 2.
Best regards,
Dino
--
http://www.nabble.com/Zend_Search_Lucene-%2B-index.lock-proble
m-tf4330822s16154.html#a12334061
Sent from the Zend MFS mailing list archive at Nabble.com.
dinok
2007-08-27 20:35:39 UTC
Permalink
Thank you for the fast fix :-)
I'll check it tomorrow.

Best regards
Post by Alexander Veremyev
PS Just fixed this in the SVN.
With best regards,
Alexander Veremyev.
-----Original Message-----
Sent: Sunday, August 26, 2007 11:08 PM
Subject: RE: [fw-formats] Zend_Search_Lucene + index.lock problem
Hi Dino,
That looks like you use current SVN version of ZF or some of
the latest snapshots and not long ago committed Lucene v2.1
index format support (r/o mode) has problems with index.lock file.
I'll check it. Please try ZF 1.0.1 before that.
With best regards,
Alexander Veremyev.
-----Original Message-----
Sent: Sunday, August 26, 2007 3:26 PM
Subject: [fw-formats] Zend_Search_Lucene + index.lock problem
Hi guys,
I'm trying to index some small data with Zend_Search_Lucene, but it
$index = new Zend_Search_Lucene('one', true); $doc = new
Zend_Search_Lucene_Document();
$doc->addField(Zend_Search_Lucene_Field::UnIndexed('link',
'link'));
$doc->addField(Zend_Search_Lucene_Field::Text('title',
'title'));
$doc->addField(Zend_Search_Lucene_Field::Text('contents',
'content')); echo "Adding test......\n"; $index->addDocument($doc);
$index->commit();
Fatal error: Uncaught exception
'Zend_Search_Lucene_Exception' with message 'File
'one/segments_1' is
not readable.' in...
Fatal error: Uncaught exception
'Zend_Search_Lucene_Exception' with message 'File
'one/index.lock' is
not readable.'
_0.cfs
deletable
segments
write.lock
When I create an empty file named 'index.lock', everything works fine...
System is WinXP SP 2.
Best regards,
Dino
--
http://www.nabble.com/Zend_Search_Lucene-%2B-index.lock-proble
m-tf4330822s16154.html#a12334061
Sent from the Zend MFS mailing list archive at Nabble.com.
--
View this message in context: http://www.nabble.com/Zend_Search_Lucene-%2B-index.lock-problem-tf4330822s16154.html#a12357212
Sent from the Zend MFS mailing list archive at Nabble.com.
Loading...