You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Brian Goetz <br...@quiotix.com> on 2002/08/30 04:07:14 UTC
Re: [Bug 12137] New: - Can '*' or '?' symbol be used as the
first character of a search?
>That's why I said it's a SMOP (small matter of programming). The rule
>that parses wildcards needs to check where the first wildcard in a term
>is, and if it's too near the front, throw an exception. Or something like
>that.
Right. I wasn't suggesting it was hard, but I still think its not a
terribly good idea. Its just way too easy for some cowboy app developer to
say "why wouldn't I want this flexibility" (developers _love_ flexibility)
without fully understanding the implications, and loose a
DoS-waiting-to-happen on their user base. Some naive user comes along, a
year after this app developer who set the knob to zero has left, and then
management is left with the perception that "Lucene is unstable."
Now, in the past we talked about implementing a policy in the wildcard
query classes about "how wild" a query term could be, as an element of
database-wide policy. I think that questions of this sort belong in the
query classes, and not in the query parser anyway. But that discussion
petered out without any resolution.
I'd be interested in reopening the "database-wide policy choices"
discussion, for things like this, default choice of tokenizer (so that its
harder to make the mistake of tokenizing with one analyzer and searching
with another), etc.
--
Brian Goetz
Quiotix Corporation
brian@quiotix.com Tel: 650-843-1300 Fax: 650-324-8032
http://www.quiotix.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [Bug 12137] New: - Can '*' or '?' symbol be used as the first character of a search?
Posted by Peter Carlson <ca...@bookandhammer.com>.
I agree that end users (or app users) will not worry about if a query
is expensive, they are just trying to get done what they need to get
done.
But, I would also say that we should not hinder app developers from
providing the functionality their app users need. If a query takes 5
min, but it is the most efficient way to get the information they need,
don't you think that this is the app developers choice, since they are
supporting the app user.
I think it is the responsibility of the app developer, not the Lucene
developer, to provide the infrastructure required to meet a given set
of requirements. I would agree that it is the Lucene Developer's job to
inform the app developer about the tool they are using, but I would
also say that since we don't know what problem an app developer is
trying to solve, and what resources they have so solve it Lucene
developers should try to provide tools to solve it, with the
appropriate information about using those tools.
If many app developers wants functionality, why wouldn't we offer a
configuration to solve their problem? Their response time may meet
their requirements. If they have the world as users and must have a
quick response time, then the app developers should make the decision
to not use a expensive query.
This happens all the time with other development environments. For
example, the default for Tomcat is to check if a jsp page should be
checked and recompiled on the fly if it's changed. This feature is
great for development, but slows down a production system. They did
however include the feature as a default.
Also, you are making an argument that we shouldn't include
functionality, but the app developer will implement the functionality
(as has been shown) and potentially not know the ramifications of what
they have done (also potentially has has been shown). If we provide a
configuration for an expensive query and provide details about why it's
expensive, then this will put more information in the hands of the app
developer to either include it or not in their query syntax. It won't
just be an unimplemented feature, but a feature that should be used
with caution.
The question is not if app developers will implement expensive query
features, but if they do how much will they understand what they have
developed and understand the limitations of Lucene.
--Peter
On Thursday, August 29, 2002, at 08:18 PM, Brian Goetz wrote:
> We went through this with range queries, too. My philosophy on the
> query parser is "anything that requires documentation must not belong
> in it", since 99.5% of the users will not only not read the
> documentation, but not realize any exists.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [Bug 12137] New: - Can '*' or '?' symbol be used as the
first character of a search?
Posted by Brian Goetz <br...@quiotix.com>.
> From a philosophical point of view, I don't believe in making something
> really hard just because it may be bad.
Nor do I, in the general case.
>It may also be a requirement and may work out great for certain applications.
And the standard query construction classes, which are designed for use by
App Developers, not App Users, are there for exactly that case.
>Also, I believe in teaching people through documentation and support. I
>understand that a developer may try to solve a user's problem and set a
>parameter that may make things slow, but I also believe that most
>developers will read about it (at least to find out how to do it and what
>the different parameters mean).
But the problem is that there are two levels of indirection here -- Lucene
Developers to App Developers, App Developers to App Users. We can teach
our customers -- the App Developers -- through documentation and support,
but can we teach them to teach? Can they even do so, given that search
interfaces are generally exposed on web pages, and web pages don't come
with documentation? And those users might not even speak the same language
as the developer? Actually, there's also a third level of indirection --
app developer -> webmaster -> app user. What are the chances that any sort
of disclaimers or documentation will filter to the end of that chain?
>In this documentation can be a BIG DISCLAIMER teaching people about the
>potential for a really big hit. This may mean that the developer
>recommends a faster machine, or gives justification for why it may be slow.
Right, but this documentation, if read at all, is extremely unlikely to
make to the end user. The end user might be halfway across the world,
checking out your website for the first time.
Lets not lose sight of the whole point of the query parser -- a safe tool
for making it easy for uneducated users to execute common forms of queries,
just like they can at Yahoo or other search engines.
If you want to build a chainsaw-without-a-safety query parser, and call it
VeryDangerousDontTryThisAtHomeQueryParser, we can discuss that. But
putting a "safe/not-quite-so-safe" switch on the parser strikes me as a bad
idea.
We went through this with range queries, too. My philosophy on the query
parser is "anything that requires documentation must not belong in it",
since 99.5% of the users will not only not read the documentation, but not
realize any exists.
--
Brian Goetz
Quiotix Corporation
brian@quiotix.com Tel: 650-843-1300 Fax: 650-324-8032
http://www.quiotix.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [Bug 12137] New: - Can '*' or '?' symbol be used as the first character of a search?
Posted by Peter Carlson <ca...@bookandhammer.com>.
From a philosophical point of view, I don't believe in making something
really hard just because it may be bad. It may also be a requirement
and may work out great for certain applications. Also, I believe in
teaching people through documentation and support. I understand that a
developer may try to solve a user's problem and set a parameter that
may make things slow, but I also believe that most developers will read
about it (at least to find out how to do it and what the different
parameters mean). In this documentation can be a BIG DISCLAIMER
teaching people about the potential for a really big hit. This may mean
that the developer recommends a faster machine, or gives justification
for why it may be slow.
What do other people think about this?
This also bring up the idea of a Lucene properties file.
I like the idea of having WildcardQuery have a definable limit of terms
that it returns.
--Peter
On Thursday, August 29, 2002, at 07:07 PM, Brian Goetz wrote:
>
>> That's why I said it's a SMOP (small matter of programming). The
>> rule that parses wildcards needs to check where the first wildcard in
>> a term is, and if it's too near the front, throw an exception. Or
>> something like that.
>
> Right. I wasn't suggesting it was hard, but I still think its not a
> terribly good idea. Its just way too easy for some cowboy app
> developer to say "why wouldn't I want this flexibility" (developers
> _love_ flexibility) without fully understanding the implications, and
> loose a DoS-waiting-to-happen on their user base. Some naive user
> comes along, a year after this app developer who set the knob to zero
> has left, and then management is left with the perception that "Lucene
> is unstable."
>
> Now, in the past we talked about implementing a policy in the wildcard
> query classes about "how wild" a query term could be, as an element of
> database-wide policy. I think that questions of this sort belong in
> the query classes, and not in the query parser anyway. But that
> discussion petered out without any resolution.
>
> I'd be interested in reopening the "database-wide policy choices"
> discussion, for things like this, default choice of tokenizer (so that
> its harder to make the mistake of tokenizing with one analyzer and
> searching with another), etc.
>
>
>
> --
> Brian Goetz
> Quiotix Corporation
> brian@quiotix.com Tel: 650-843-1300 Fax:
> 650-324-8032
>
> http://www.quiotix.com
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>