Re: Weird operator precedence with default operator AND

2007-10-12 Thread Martin Dietze
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... > >

Re: Weird operator precedence with default operator AND

2007-10-11 Thread Martin Dietze
On Wed, October 10, 2007, Mark Miller wrote: > Back in the day you might have been able to call Query.toString() as the > Query contract says that toString() should output valid QueryParser syntax. > This does not work for many queries though (most notably Span Queries -- > QueryParser knows no

Re: Weird operator precedence with default operator AND

2007-10-11 Thread Martin Dietze
On Wed, October 10, 2007, Chris Hostetter wrote: > Eh ... not really. it would be easier to just load the Qsol parser in > solr ... or toString() the query... This would be nice, but unfortunately I do not have direct access to the solr server in my application. I need to parse queries, filter

Re: Weird operator precedence with default operator AND

2007-10-10 Thread Martin Dietze
Mark, On Wed, October 10, 2007, Martin Dietze wrote: > > Qsol: myhardshadow.com/qsol (A query parser I wrote that has fully > > customizable precedence support - don't be fooled by the stale website...I > > am actually working on version 2 as i have time) > >

Re: Weird operator precedence with default operator AND

2007-10-10 Thread Martin Dietze
Mark, this reply was just in time :) On Wed, October 10, 2007, Mark Miller wrote: > Precedence QueryParser (I think its in Lucene contrib packages - I don't > believe its perfect but I have not tried it) I checked that one out, and while it improves things with default settings I found it to

Re: Weird operator precedence with default operator AND

2007-10-10 Thread Martin Dietze
On Tue, October 09, 2007, Daniel Naber wrote: > The operator precedence is known to be buggy. You need to use parenthesis, > e.g. (aa AND bb) OR (cc AND dd) This would be fine with me but unfortunately not for my users. More precisely, I need to analyze a query string from one search engine, fil

Weird operator precedence with default operator AND

2007-10-09 Thread Martin Dietze
Hi, I've been going nuts trying to use LuceneParser parse query strings using the default operator AND correctly: String queryString = getQueryString(); QueryParser parser = new QueryParser("text", new StandardAnalyzer()); parser.setDefaultOperator(QueryParser.AND_OPERATOR); try { Query q = pa