Issue Type: Docs: Problem Created: 2009-05-19T13:50:08.000+0000 Last Updated: 2010-01-21T09:36:45.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)
Reporter: Chris Williams (cdub) Assignee: Jordan Ryan Moore (jordanryanmoore) Tags: - Zend_Search_Lucene
Related issues: Attachments: - ZF-6732.patch
I'm actually looking for Zend to generate a query similar to the one shown in this section (specifically the author part):
<pre class="literal"> +(word1 word2 word3) author:(word4 word5) -word6
Instead, when I run this sample code, I get the following:
<pre class="literal"> +(word1 word2 word3) (author:word4 author:word5) -word6
Notice that the "author" term is not on the outside of the parens as the example shows. My code is also behaving this way but I'd prefer that it work the way the example shows. I'd really like the ability to create a more streamlined query string but if that's not possible, the documentation should probably be changed.
Posted by Christopher Thomas (cwt137) on 2010-01-21T06:06:23.000+0000
The correct section is 46.5.4. Confirmed the typo by running the Lucene search code underneath query. Attached is a patch.
Posted by Alexander Veremyev (alexander) on 2010-01-21T09:36:45.000+0000
Specifying field name as a default field name for all subqueries is a query parser feature.
Field name has to be seet at term object creation time if query is constructed using API (null means "any field").
So updated doc example is more correct even queries are the same.
Have you found an issue?
See the Overview section for more details.