solr cross doc join on relational database

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

solr cross doc join on relational database

Ali Nazemian
Hi every body,
I was wondering is there any way for using cross doc join on integraion of
one solr core and a relational database.
Suppose I have a table in relational database (my sql) name USER. I want to
keep track of news that each user can have access. Assume news are stored
inside solr and there is no easy way of transferring USER table to solr
(because of so many changes that should be done inside other part of my
application) So my question would be is there any way of having cross doc
join with one document inside Solr and another one inside RDBMS?
Best regards.
--
A.Nazemian
Reply | Threaded
Open this post in threaded view
|

Re: solr cross doc join on relational database

iorixxx
Hi Ali,

I did a similar user filtering by indexing user table once per hour, and filtering results by solr query time join query parser.

Assuming there is no easy way to transfer USER table to solr, Solr post filtering is the way to : 

http://searchhub.org/2012/02/22/custom-security-filtering-in-solr/

You can connect to your database in it, filter according to rights. ( can this user see this document?)

/**
 * Note that this Query implementation can _only_ be used as an fq, not as a q (it would need to implement createWeight).
 */
public class AreaIsOpenControlQuery extends ExtendedQueryBase implements PostFilter {



On Friday, May 30, 2014 2:26 PM, Ali Nazemian <[hidden email]> wrote:



Hi every body,
I was wondering is there any way for using cross doc join on integraion of
one solr core and a relational database.
Suppose I have a table in relational database (my sql) name USER. I want to
keep track of news that each user can have access. Assume news are stored
inside solr and there is no easy way of transferring USER table to solr
(because of so many changes that should be done inside other part of my
application) So my question would be is there any way of having cross doc
join with one document inside Solr and another one inside RDBMS?
Best regards.
--
A.Nazemian
Reply | Threaded
Open this post in threaded view
|

Re: solr cross doc join on relational database

Ali Nazemian
Thank you very much. I will take a look at that.


On Fri, May 30, 2014 at 4:24 PM, Ahmet Arslan <[hidden email]> wrote:

> Hi Ali,
>
> I did a similar user filtering by indexing user table once per hour, and
> filtering results by solr query time join query parser.
>
> Assuming there is no easy way to transfer USER table to solr, Solr post
> filtering is the way to :
>
> http://searchhub.org/2012/02/22/custom-security-filtering-in-solr/
>
> You can connect to your database in it, filter according to rights. ( can
> this user see this document?)
>
> /**
>  * Note that this Query implementation can _only_ be used as an fq, not as
> a q (it would need to implement createWeight).
>  */
> public class AreaIsOpenControlQuery extends ExtendedQueryBase implements
> PostFilter {
>
>
>
> On Friday, May 30, 2014 2:26 PM, Ali Nazemian <[hidden email]>
> wrote:
>
>
>
> Hi every body,
> I was wondering is there any way for using cross doc join on integraion of
> one solr core and a relational database.
> Suppose I have a table in relational database (my sql) name USER. I want to
> keep track of news that each user can have access. Assume news are stored
> inside solr and there is no easy way of transferring USER table to solr
> (because of so many changes that should be done inside other part of my
> application) So my question would be is there any way of having cross doc
> join with one document inside Solr and another one inside RDBMS?
> Best regards.
> --
> A.Nazemian
>



--
A.Nazemian