lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ayush choubey <>
Subject Lucene index joining
Date Sun, 14 Jun 2015 04:35:46 GMT
I am very new to lucene and had a question on regarding its usage

So here's my scenario

I already have a Lucene index of some commodities(a table which has been
converted to lucene index), where I can search over on the basis of some

Now I have another table in my database which has some commodity id and
user id mapping

Now, if i were to be given a list of user id, I have to figure out the
commodities which can be seen by the user (i.e commoditires from main table
-  commodities which is not the part of userlist). In terms of SQL Query,
something like

select * from commodity where cm_id not in(select cm_id from commod_user
where userid in ?some list)

However in the above case we already have an index over commodity table and
commod_user table is well just a table.

This would given me commodities which are related to certain users.
Currently, I only work on commodity index and have to add the functionality
to filter by user list.

One thing that I can think of is to get the cm_id from second table and
then remove those commodities from the result of the first index. However
that's sort of a fix, and I would like if the entire thing can be solved by
lucene only(for the performance issue ofcourse).

So how do you say should I index commod_user table. Is there some kind of
join available or something which i can use for my case

Waiting for the positive reply

Best Regards
Ayush Choubey

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