Re: Combining keyword queries with database-style queries

2008-10-25 Thread Niels Ott
Erick Erickson schrieb: Is this an inadvertent re-post or is there still something you're wondering about? I originally posted with an address not subscribed to the list, causing the list server to silently swallow the message. Now the message apparently made it here with some delay, for what

Re: Combining keyword queries with database-style queries

2008-10-24 Thread Erick Erickson
Is this an inadvertent re-post or is there still something you're wondering about? Erick On Wed, Oct 22, 2008 at 9:14 AM, Niels Ott <[EMAIL PROTECTED]> wrote: > Hi everybody, > > I need to query for documents not only for search terms but also for > numeric values (or other general types). Let m

Combining keyword queries with database-style queries

2008-10-24 Thread Niels Ott
Hi everybody, I need to query for documents not only for search terms but also for numeric values (or other general types). Let me try to explain with a hypothetical example. Assuming there is a value for the number words in each document (or the number of person names, or whatever), I would

Re: Combining keyword queries with database-style queries

2008-10-24 Thread Erick Erickson
Hacky is in the eye of the hacker . It's hard to keep in mind that Lucene is a search engine, not a database, so whenever I find myself thinking in database terms, I'm usually making things difficult. It operates on strings, not the "usual" data types that one thinks are available in programming l

Re: Combining keyword queries with database-style queries

2008-10-24 Thread Niels Ott
Erick, this RangeQuery thing looks promising. It might be a bit hacky but it will most probably do the job in the given time and framework. Thanks a lot, Niels Erick Erickson schrieb: Well, assuming that token_count is an indexed field in your documents (i.e. not something you're computi

Re: Combining keyword queries with database-style queries

2008-10-23 Thread Erick Erickson
Well, assuming that token_count is an indexed field in your documents (i.e. not something you're computing on the fly), just use a RangeQuery for the numeric part. Actually, you probably want to use ConstantScoreRangeQuery... The only thing you have to watch is that Lucene does a lexical compare,

Re: Combining keyword queries with database-style queries

2008-10-23 Thread mathieu
Compass handles that nicely. You can first query, lucene and building a IN (...) in your SQL db. Or you can ask your SQL first, and handling it with a bitset in Lucene. M. On Thu, 23 Oct 2008 14:27:53 +0200, Niels Ott <[EMAIL PROTECTED]> wrote: > Hi everybody, > > I need to query for documents

Combining keyword queries with database-style queries

2008-10-23 Thread Niels Ott
Hi everybody, I need to query for documents not only for search terms but also for numeric values (or other general types). Let me try to explain with a hypothetical example. Assuming there is a value for the number words in each document (or the number of person names, or whatever), I would wan