Issues

ZF-6732: Zend_Search_Lucene_Query - section 54.5.4 - incorrect search query displayed

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

Description

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.

Comments

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.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts