I also tried to search numbers, but I don't get the right listing.
Does anybody notices same issues on their applications?

Advices are really appreciated.
Thanks

Sergio Rinaudo



From: [email protected]
To: [email protected]
Date: Sat, 1 Aug 2009 06:41:44 +0200
Subject: [fw-general] Some strange behaviour with Zend_Search_Lucene








Hi, 
I'm trying to improve my search queries using Zend_Search_Lucene, 
according with this documentation page 
http://framework.zend.com/manual/en/zend.search.lucene.query-language.html, 
these '+ - && || ! ( ) { } [ ] ^ " ~ * ? : \
        ' are special characters that needs to be escaped.

I've done some testing but I am not able to get the right result, I have for 
example something like this inside my contents

[word1 word2]

and I tried this query

+(+\[word1 +word2\]) +(+someField:someWord +someField2:someWord2 
+someField3:someWord3) 


and also



+(+\[word1 word2\]) +(+someField:someWord +someField2:someWord2 
+someField3:someWord3) 


and also



+(\[word1 word2\]) +(+someField:someWord +someField2:someWord2 
+someField3:someWord3) 

and also



+("\[word1 word2\]") +(+someField:someWord +someField2:someWord2 
+someField3:someWord3) 

and +(+\[word1 +word2\]) ( sorry for this long list )

This query is constructed with the API, basically a Boolean query with 2 
subqueryes, the second one always a MultiTerm, for the first 
I tried with both MultiTerm and Phrase.
Using Luke I get the expected result.

So I am asking some advice to make an eventually special character search to be 
working...



Second question, only If I do a particular search, I get this Notice

Notice:  Undefined offset:  9 in 
C:\wamp\proj\library\Zend\Search\Lucene\Search\Query\MultiTerm.php on line 473

The query is something like +(+word1 +word2) +(+someField:someWord 
+someField2:someWord2 +someField3:someWord3)  
where word1 and word2 could be anything. Hovewer this is not a real problem, 
just a notice.

All tests done with ZF Version 1.9.0b1



I have a third and last question, does ZF documentation site uses Lucene?
I tried to search (1+1):2

and I did not get the expected page ( 
http://framework.zend.com/manual/en/zend.search.lucene.query-language.html )



Regards



Sergio Rinaudo
Sviluppatore Web - Esperto SEO - Zend Framework
Blog Tecnico: http://razorblade.netsons.org/



Condividi i tuoi ricordi online con chi vuoi tu chi vuoi tu.
_________________________________________________________________
Porta Hotmail in vacanza. Leggi la posta dal cellulare!
http://new.windowslivemobile.msn.com/IT-IT/windows-live-hotmail/default.aspx

Reply via email to