Re: How can i index a Java Bean into Lucene application ?

2011-08-07 Thread Sujit Pal
Depending on what you wanted to do with the Javabean (I assume you want to make some or all its fields searchable since you are writing to Lucene), you could use reflection to break it up into field name value pairs and write them out to the IndexWriter using something like this: Document d = new

Re: Rewriting other query types into span queries and two questions about this

2011-08-07 Thread Michael Sokolov
On 8/4/2011 9:06 PM, Trejkaz wrote:... For AND (and for any default boolean queries which aren't equivalent to OR) queries, I have problems. For instance, you can't do this: within(5, 'my', and('cat', 'dog')) - and( within(5, 'my', 'cat'), within(5, 'my', 'dog') ) The problem is that

Re: Rewriting other query types into span queries and two questions about this

2011-08-07 Thread Trejkaz
On Mon, Aug 8, 2011 at 8:58 AM, Michael Sokolov soko...@ifactory.com wrote: Can you do something approximately equivalent like: within(5, 'my', and('cat', 'dog')) - within(5, 'my', within(5, 'cat', 'dog') ) Might not be exactly the same in terms of distances (eg cat x x x my x x x dog)

Re: Rewriting other query types into span queries and two questions about this

2011-08-07 Thread Trejkaz
On Mon, Aug 8, 2011 at 10:00 AM, Trejkaz trej...@trypticon.org wrote:    within(5, 'my', and('cat', 'dog')) - within(5, 'my', within(10, 'cat', 'dog') ) To extend my example and maybe make it a bit more hellish, take this one: within(2, A, and(B, or(C, and(D, E After rewriting both