Well, you may want to massage that user-entered query string a little bit, perhaps just enough to get rid of AND, OR, and NOT. What if the user enters *foo? Leading wildcards won't work, most likely. You can either let things break or proactively try to fix thing (like the annoying MS Word autocorrection feature ;)).
Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch ----- Original Message ---- > From: Leonardo Santagada <[EMAIL PROTECTED]> > To: solr-user@lucene.apache.org > Sent: Thursday, February 28, 2008 11:41:40 PM > Subject: Re: +fieldname sintax question > > yes, but they should be the same no? > > and the problem is that the we are using something like "+fieldname: > ()" to generate this query... so > doing like you said is not really easy. > > On 29/02/2008, at 01:25, Otis Gospodnetic wrote: > > > Are you really trying to the following? > > > > -Title:(Canada) +authorOrCreator:(mcdonald) > > > > Otis > > > > -- > > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > ----- Original Message ---- > >> From: Leonardo Santagada > >> To: solr-user@lucene.apache.org > >> Sent: Thursday, February 28, 2008 11:02:26 PM > >> Subject: +fieldname sintax question > >> > >> On our search, we need to especify some search criteria in some > >> search > >> fields, the only way to do that for us has been using the default > >> query handler (and inside each field we escape the characters that we > >> don't want to influence the search, more or less what dismax does for > >> the whole query). But this is not working > >> > >> Title:(NOT Canada) +authorOrCreator:(mcdonald) > >> > >> Matches a lot of documents, the first one having a title that doesn't > >> contains Canada in the title (and many others that doesnt also). > >> > >> but: > >> > >> +Title:(NOT Canada) +authorOrCreator:(mcdonald) > >> > >> Matches exactly 0 docs. > >> > >> Why is that and how can we make solr search for a doc that does not > >> contain canada and also does not contain mcdonald (and the default > >> combinator can be either or or and). > >> > >> thanks in advance > >> > >> -- > >> Leonardo Santagada > >> > >> > >> > >> > > > > > > -- > Leonardo Santagada > > > >