You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Otis Gospodnetic <ot...@yahoo.com> on 2006/01/11 03:36:33 UTC
BooleanQuery: static setMaxClauseCount(int)?
Hi,
Is there a reason this method is static?
public static void setMaxClauseCount(int maxClauseCount)
If not, I'll change it.
Thanks,
Otis
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: BooleanQuery: static setMaxClauseCount(int)?
Posted by Paul Elschot <pa...@xs4all.nl>.
On Wednesday 11 January 2006 03:54, Chris Hostetter wrote:
>
> I thought the purpose of this method was for applications to specify the
> largest possible BooleanQuery that could be created in their application
> (either progromaticaly, via QueryParser, or as a result of rewriting a
> non-primative).
>
> Changing this to be non-static would (besides breaking existing
> applications) leave apps with no way to limit the number of clauses
> generated "under the covers".
>
>
> : Date: Tue, 10 Jan 2006 18:36:33 -0800 (PST)
> : From: Otis Gospodnetic <ot...@yahoo.com>
> : Reply-To: java-dev@lucene.apache.org,
> : Otis Gospodnetic <ot...@yahoo.com>
> : To: java-dev@lucene.apache.org
> : Subject: BooleanQuery: static setMaxClauseCount(int)?
> :
> : Hi,
> :
> : Is there a reason this method is static?
> :
> : public static void setMaxClauseCount(int maxClauseCount)
> : If not, I'll change it.
> :
> : Thanks,
> : Otis
For most normal uses, the maximum clause count for a query is an
attribute of BooleanQuery. However, it's quite possible that the
maximum clause count should be applied to other queries, for example
a SpanOrQuery.
For that reason the surround query language has a BasicQueryFactory
class that limits the number of TermQueries and SpanTermQueries used
for the top level query:
contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/BasicQueryFactory.java
In Lucene, an object like this might be used during Query.rewrite().
But when I wrote the surround language, I did not see a way of passing
a BasicQueryFactory around during rewrite(), so I used a completely
different way to expand queries in the surround language.
The maximum clause count only needs to be "local" to Query.rewrite(),
so it might be necessary to move setMaxClauseCount() from BooleanQuery
to Query lateron, for example when the "Advanced" query language
discussed recently runs into this problem.
Regards,
Paul Elschot
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: BooleanQuery: static setMaxClauseCount(int)?
Posted by Chris Hostetter <ho...@fucit.org>.
I thought the purpose of this method was for applications to specify the
largest possible BooleanQuery that could be created in their application
(either progromaticaly, via QueryParser, or as a result of rewriting a
non-primative).
Changing this to be non-static would (besides breaking existing
applications) leave apps with no way to limit the number of clauses
generated "under the covers".
: Date: Tue, 10 Jan 2006 18:36:33 -0800 (PST)
: From: Otis Gospodnetic <ot...@yahoo.com>
: Reply-To: java-dev@lucene.apache.org,
: Otis Gospodnetic <ot...@yahoo.com>
: To: java-dev@lucene.apache.org
: Subject: BooleanQuery: static setMaxClauseCount(int)?
:
: Hi,
:
: Is there a reason this method is static?
:
: public static void setMaxClauseCount(int maxClauseCount)
: If not, I'll change it.
:
: Thanks,
: Otis
:
:
:
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
: For additional commands, e-mail: java-dev-help@lucene.apache.org
:
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: .cfs file...
Posted by Otis Gospodnetic <ot...@yahoo.com>.
o.a.l.index.CompoundFileWriter
Otis
----- Original Message ----
From: Aditya Liviandi <ad...@i2r.a-star.edu.sg>
To: java-dev@lucene.apache.org
Sent: Tue 10 Jan 2006 09:44:11 PM EST
Subject: .cfs file...
Which classes handle the writing into the .cfs file?
--------------------------------------------------
This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you.
--------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
.cfs file...
Posted by Aditya Liviandi <ad...@i2r.a-star.edu.sg>.
Which classes handle the writing into the .cfs file?
--------------------------------------------------
This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you.
--------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org