Discussion:
possible index corruption
gherson
2008-01-02 21:56:06 UTC
Permalink
I'm developing a Zend_Search_Lucene-powered text search feature for my
intranet. I'm currently rebuilding my index ~daily to get past symptoms:

1. Luke becomes unable to open the index, instead returning, e.g.,
"\\storage01\Store_01\Sites_02\INDEXES\MainIndex\_l.cfs (The system cannot
find the file specified)".

2. Line
Zend_Search_Lucene::open("$IndexPath/MainIndex")
hangs.

If I had to guess I'd say my problem starts when >1 PHP scripts try
accessing the index simultaneously (which I read is allowed).

The only thing special before the index open command is
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new
Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive());

Platform is WinXP Pro, PHP Version 5.2.4, "Apache/2.2.6 (Win32) DAV/2", Zend
Framework 1.0.2.

TIA,
George Herson
--
View this message in context: http://www.nabble.com/possible-index-corruption-tp14587058s16154p14587058.html
Sent from the Zend MFS mailing list archive at Nabble.com.
Johannes Schmidt
2008-01-02 23:11:47 UTC
Permalink
Hi George,

it's just a (fast) guess:
http://framework.zend.com/manual/en/zend.search.lucene.index-creation.html#zend.search.lucene.index-creation.limitations

Regards,
Johannes
Post by gherson
I'm developing a Zend_Search_Lucene-powered text search feature for my
1. Luke becomes unable to open the index, instead returning, e.g.,
"\\storage01\Store_01\Sites_02\INDEXES\MainIndex\_l.cfs (The system cannot
find the file specified)".
2. Line
Zend_Search_Lucene::open("$IndexPath/MainIndex")
hangs.
If I had to guess I'd say my problem starts when >1 PHP scripts try
accessing the index simultaneously (which I read is allowed).
The only thing special before the index open command is
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new
Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive());
Platform is WinXP Pro, PHP Version 5.2.4, "Apache/2.2.6 (Win32) DAV/2", Zend
Framework 1.0.2.
TIA,
George Herson
Johannes Schmidt
2008-01-02 22:56:10 UTC
Permalink
Hi George,

it's just a (fast) guess:
http://framework.zend.com/manual/en/zend.search.lucene.index-creation.html#zend.search.lucene.index-creation.limitations

Regards,
Johannes
Post by gherson
I'm developing a Zend_Search_Lucene-powered text search feature for my
1. Luke becomes unable to open the index, instead returning, e.g.,
"\\storage01\Store_01\Sites_02\INDEXES\MainIndex\_l.cfs (The system cannot
find the file specified)".
2. Line
Zend_Search_Lucene::open("$IndexPath/MainIndex")
hangs.
If I had to guess I'd say my problem starts when >1 PHP scripts try
accessing the index simultaneously (which I read is allowed).
The only thing special before the index open command is
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new
Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive());
Platform is WinXP Pro, PHP Version 5.2.4, "Apache/2.2.6 (Win32) DAV/2", Zend
Framework 1.0.2.
TIA,
George Herson
gherson
2008-01-03 14:46:22 UTC
Permalink
Thanks, Johannes. You found the problem. I'd read the limitations but
hadn't studied them carefully enough. From your link:

'29.2.7.2. Supported Filesystems

'Zend_Search_Lucene uses flock() to provide concurrent searching, index
updating and optimization.

'According to the PHP documentation, "flock() will not work on NFS and many
other networked file systems".

'Do not use networked file systems with Zend_Search_Lucene.'

http://us2.php.net/manual/en/function.flock.php says "When using a
multithreaded server API like ISAPI you may not be able to rely on flock()
to protect files against other PHP scripts running in parallel threads of
the same server instance!"

One of the two web servers involved in my testing has an ISAPI, not an
Apache2, server API.

Question: is there any way to use Zend_Search_Lucene on a server whose api
is ISAPI?

thank you,
George Herson
Post by Johannes Schmidt
Hi George,
http://framework.zend.com/manual/en/zend.search.lucene.index-creation.html#zend.search.lucene.index-creation.limitations
Regards,
Johannes
Post by gherson
I'm developing a Zend_Search_Lucene-powered text search feature for my
1. Luke becomes unable to open the index, instead returning, e.g.,
"\\storage01\Store_01\Sites_02\INDEXES\MainIndex\_l.cfs (The system cannot
find the file specified)".
2. Line
Zend_Search_Lucene::open("$IndexPath/MainIndex");
hangs.
If I had to guess I'd say my problem starts when >1 PHP scripts try
accessing the index simultaneously (which I read is allowed).
The only thing special before the index open command is
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new
Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive());
Platform is WinXP Pro, PHP Version 5.2.4, "Apache/2.2.6 (Win32) DAV/2", Zend
Framework 1.0.2.
TIA,
George Herson
--
View this message in context: http://www.nabble.com/possible-index-corruption-tp14587058s16154p14598127.html
Sent from the Zend MFS mailing list archive at Nabble.com.
Loading...