lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Dietze ...@fh-wedel.de>
Subject Re: Weird operator precedence with default operator AND
Date Fri, 12 Oct 2007 08:14:30 GMT
Chris,

On Thu, October 11, 2007, Chris Hostetter wrote:

> ... are you talking about preventing people from including field 
> specific queries in their query string? i'm guessing that you mean 
> something like this is okay...
> 
>         solr title:bobby body:boy
> 
> ...but this isn't...
> 
> 	solr title:bobby body:boy secret_field:xyzyq
> 
> ...is that the idea?

 yes that's just about it. We have two search engines for
different purposes. The first one indexes more fields than the
second and we want to prevent "good" search queries from failing
on the second. Supporting all theses fields on the second SE is
not a good idea since indexing all this additonal data would
have an impact on performance and index size.

> the easiest approach is to do your own simple pass over the query string, 
> and escape any metacharacters in clauses you don't like ... they'll be 
> treated as "terms" and either be ignored (if they are optional) or cause 
> the query to not match anything (if they are required)...

This is a very interesting idea. Yet I wonder how to deal with
such terms if they are part of an AND query (actually AND is our
default operator, so that a query "body:boy secret_field\:xyzyq"
would always fail. It seems obvious that in any case you end up
parsing the query in some way...

Cheers,

Martin

-- 
----------- / http://herbert.the-little-red-haired-girl.org / -------------
=+= 
My family says I'm a psychopath, but the voices in my head disagree

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message