You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Olivier Austina <ol...@gmail.com> on 2014/03/16 23:44:03 UTC

Querying specific database attributes or table

Hi,
I am new to Solr.

I would like to index and querying a relational database. Is it possible to
query a specific table or attribute of the database. Example if I have 2
tables A and B both have the attribute "name" and I want to have only the
results form the table A and not from table B. Is it possible?
Can I restrict the query to only one table without having result from
others table?
Is it possible to query a specific attribute of a table?
Is it possible to do join query like SQL?
Any suggestion is welcome. Thank you.

Regards
Olivier

Re: Querying specific database attributes or table

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Oliver,

If you index a field (say source) holding table name, you can filter by that field.
e.q. fq=source:TableA    http://wiki.apache.org/solr/CommonQueryParameters#fq

It is possible to query a specific attribute of a table. This is usually corresponds to fields in solr.

See https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers for different type of joins.

Ahmet




On Monday, March 17, 2014 12:44 AM, Olivier Austina <ol...@gmail.com> wrote:
Hi,
I am new to Solr.

I would like to index and querying a relational database. Is it possible to
query a specific table or attribute of the database. Example if I have 2
tables A and B both have the attribute "name" and I want to have only the
results form the table A and not from table B. Is it possible?
Can I restrict the query to only one table without having result from
others table?
Is it possible to query a specific attribute of a table?
Is it possible to do join query like SQL?
Any suggestion is welcome. Thank you.

Regards
Olivier