lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mathieu <>
Subject Re: Combining keyword queries with database-style queries
Date Thu, 23 Oct 2008 12:43:46 GMT

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.


On Thu, 23 Oct 2008 14:27:53 +0200, 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 want to formulate a query
> like "Give me documents containing 'jack johnson' AND with token_count >
> 250".
> I've been working with Lucene before and the keyword part is easy, but
> what would be a good solution to query for numbers etc.?
> One first idea I had was storing the numbers (which are basically a
> HashMap<String,Double>) in the index in some way or the other. But it is
> not at all obvious for me how to query them then.
> Another thing I could think of would be using a separate database of any
> type, but then how to bring those two together in a way that makes sense?
> Any pointers to useful resources and any types of hints are welcome! :-)
> Best,
>    Niels

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message