Chuck Burd wrote:
I'm using Cocoon 2.1.

Is there a way to configure the Lucene default Boolean search behavior by a setting within cocoon.xconf?

Well, cocoon 2.1(.11) comes with lucene 1.4.3 and a default implementation
in SimpleLuceneCocoonSearcherImpl. The configuration of this component via
cocoon.xconf is restricted to analyzer, default_searchfield, default_query
and index_directory.

But you may modify SimpleLuceneCocoonSearcherImpl in order to fulfill your
requirements.

Replace:
355            Query query = QueryParser.parse(query_string, default_field, 
analyzer);

with:
355            QueryParser parser = new QueryParser(default_field, analyzer);
356            parser.setOperator(QueryParser.AND);
357            Query query = parser.parse(query_string);

hth
~eike


I apologize for my general ignorance.

Thanks,

Chuck Burd
crb...@gmail.com

On Jul 28, 2009, at 8:17 AM, Eike Jordan wrote:

parser.setDefaultOperator(Operator.AND);


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



--
Eike Jordan  <jor...@fiz-chemie.de>

| FIZ CHEMIE BERLIN
| Franklin Str. 11               ------    ,__o
| 10587 Berlin                  ------   _-\_<,
|                              ------   (+)/'(+)
| Tel. : 0049-30-39977 214


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Reply via email to