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 Chris Hostetter
: 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 out blacklisted facettes and then parse them on to solr : using solrj. that depends ... what do you mean by a blacklisted facet? facet counts are controlle

Re: Weird operator precedence with default operator AND

2007-10-11 Thread Mark Miller
Martin Dietze wrote: 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 --

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 Chris Hostetter
: As usual, thank you to the gruff but brilliant Mr Hostetter. Doh! ... sorry if i've been gruffer then usual ... i've been rotating my sleep schedule so my days start an hour earlier each day for the last 6 days. it's been throwing my psyche for a loop. -Hoss --

Re: Weird operator precedence with default operator AND

2007-10-10 Thread Mark Miller
As usual, thank you to the gruff but brilliant Mr Hostetter. - Mark Chris Hostetter wrote: : I have only taken passing glances at Solr, so I am afraid I cannot be of much : help. Certainly one of the Solr guys will be able to be of assistance though. the StandardRequestHandler in solr will acc

Re: Weird operator precedence with default operator AND

2007-10-10 Thread Chris Hostetter
: I have only taken passing glances at Solr, so I am afraid I cannot be of much : help. Certainly one of the Solr guys will be able to be of assistance though. the StandardRequestHandler in solr will accept anythign the lucene QueryParser will accept ... sublcassing StandardRequestHandler to us

Re: Weird operator precedence with default operator AND

2007-10-10 Thread Mark Miller
I have only taken passing glances at Solr, so I am afraid I cannot be of much help. Certainly one of the Solr guys will be able to be of assistance though. Since Qsol generates Query objects, you just need to find out how to bypass sending solr a query String and instead give it a Query object

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) > > That sounds promising, I will chec

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

Re: Weird operator precedence with default operator AND

2007-10-10 Thread Mark Miller
There is a lot on this topic if you search the archives. Things to check out: Precedence QueryParser (I think its in Lucene contrib packages - I don't believe its perfect but I have not tried it) Qsol: myhardshadow.com/qsol (A query parser I wrote that has fully customizable precedence suppo

Re: Weird operator precedence with default operator AND

2007-10-09 Thread Daniel Naber
On Tuesday 09 October 2007 09:55, Martin Dietze wrote: > I've been going nuts trying to use LuceneParser parse query > strings using the default operator AND correctly: The operator precedence is known to be buggy. You need to use parenthesis, e.g. (aa AND bb) OR (cc AND dd) regards Daniel -

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