Re: Query modifier

2010-03-30 Thread Jason Rutherglen
David, I totally agree with this idea. On Tue, Mar 30, 2010 at 9:58 AM, David Smiley (@MITRE.org) wrote: > > I observed this problem when I started using Lucene (ages ago) and it's a > shame this situation persists.  In summary, it would be tremendously useful > if Query objects were fully mutabl

Re: Query modifier

2010-03-30 Thread David Smiley (@MITRE.org)
I observed this problem when I started using Lucene (ages ago) and it's a shame this situation persists. In summary, it would be tremendously useful if Query objects were fully mutable and offered a visitor pattern to allow walking the query tree to facilitate rewriting. It would also be nice if

Re: Query modifier

2010-03-30 Thread David Smiley (@MITRE.org)
I observed this problem when I started using Lucene (ages ago) and it's a shame this situation persists. In summary, it would be tremendously useful if Query objects were fully mutable and offered a visitor pattern to allow walking the query tree to facilitate rewriting. I could open a JIRA issu

Re: Query modifier

2005-12-19 Thread Erik Hatcher
Chris and Paul - thanks to you both for replying on this. Paul - I keep forgetting about the goodies hidden in the Surround parser. I'll take another look at them soon. Chris - I think your code would be good to see as a contribution candidate for the contrib area. QueryFilter definitely

Re: Query modifier

2005-12-17 Thread Chris Lamprecht
One other note -- I remember now, when I was developing this code, I first looked at Nutch's query processing code, but I think Nutch assumed the queries were always flat to begin with. So I took Nutch's "query filter" approach, but made it work with nested queries that aren't always flat. -chris

Re: Query modifier

2005-12-17 Thread Chris Lamprecht
Hi Erik, I ran into the same thing in my work so I created a query utility class and an interface called QueryFilter (I know this is a bad name) that is really more of a visitor pattern callback thing. Most of my methods are convenience methods built on top of this interface and a few classes tha

Re: Query modifier

2005-12-16 Thread Paul Elschot
On Friday 16 December 2005 11:42, Erik Hatcher wrote: > In my latest project, I've written code to walk a general Query and > do three different manipulations of it: 1) Convert it to a SpanQuery > 2) Change a specified field to another field for each nested Query 3) > Rotate (Span)RegexQuery