lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Howe <silentgun...@gmail.com>
Subject Re: Lucene join
Date Mon, 27 Aug 2012 18:29:56 GMT
Trupti,

Looking over your sample query, that looks like you're trying to do a SQL
query against a database instead of a Lucene query. If you're going against
a SQL database, Lucene isn't a good tool for the problem you've outlined.
If you're using SQL, you can do multiple joins to link multiple tables
together. For instance, SELECT * FROM foo INNER JOIN bar ON foo.pid =
bar.idINNER JOIN foobar ON bar.oid = foobar.uid WHERE
foo.name != 'name'; lets you perform an inner join across three distinct
tables.

If you have a collection of text documents, for instance sales reports, and
want to find all the unstructured text documents mentioning the words
"BigClient", then Lucene offers a good solution to the problem. You could
create a simple term query that finds only those documents in the index
with the term "BigClient". The query would look like this (+BigClient) when
you ran the toString method after building the query.

If you're using a SQL database, Lucene isn't a good solution to the problem
you specified.

Hope it helps!
Stephen

On Mon, Aug 27, 2012 at 6:01 AM, Trupti Ghuge <truptig@techmahindra.com>wrote:

> Hi,
>
>
>
> I am new to Lucene. I have a complex query where I need to join more
> than two tables and have different filtering criteria on it.
>
> Is it possible to use Lucene for this ?
>
>
>
> For example , my query is as follows(there is no foreing key relation on
> the tables):
>
>
>
> Select x.id from tablex x, tabley y where (x.id=y.testid and
> y.typeid=7),.....
>
>
>
> There are more filter queries ahead.
>
>
>
> Waiting for your reply.
>
>
>
>
>
> Thanks & Regards,
>
> Trupti Ghuge
>
>
>
>
>
>
> ============================================================================================================================Disclaimer:
>  This message and the information contained herein is proprietary and
> confidential and subject to the Tech Mahindra policy statement, you may
> review the policy at <a href="http://www.techmahindra.com/Disclaimer.html
> ">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="
> http://tim.techmahindra.com/tim/disclaimer.html">
> http://tim.techmahindra.com/tim/disclaimer.html</a> internally within
> Tech
> Mahindra.============================================================================================================================
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message