Query More Than One Core

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

Query More Than One Core

rhys J
I have more than one core. Each core represents one database table.

They are coordinated by debt_id/debtor_id, so we can do join statements on
them with Sybase/SQL.

Is there a way to query more than one core at a time, or do I need to do
separate queries per core, and then somehow with perl aggregate them into
one list?

Thanks,

Rhys
Reply | Threaded
Open this post in threaded view
|

Re: Query More Than One Core

Jörn Franke
You can use nested indexing and Index both types of documents in one core.

https://lucene.apache.org/solr/guide/8_1/indexing-nested-documents.html

However, what is the use case for Solr if you have already a database?

> Am 13.11.2019 um 20:50 schrieb rhys J <[hidden email]>:
>
> I have more than one core. Each core represents one database table.
>
> They are coordinated by debt_id/debtor_id, so we can do join statements on
> them with Sybase/SQL.
>
> Is there a way to query more than one core at a time, or do I need to do
> separate queries per core, and then somehow with perl aggregate them into
> one list?
>
> Thanks,
>
> Rhys
Reply | Threaded
Open this post in threaded view
|

Re: Query More Than One Core

rhys J
On Wed, Nov 13, 2019 at 3:16 PM Jörn Franke <[hidden email]> wrote:

> You can use nested indexing and Index both types of documents in one core.
>
> https://lucene.apache.org/solr/guide/8_1/indexing-nested-documents.html


I had read that, but it doesn't really fit our needs right now.

I figured out how to do a join like so:

http://localhost8983/solr/debt/select?indent=on&rows=100&sort=id
asc&q=(debt_id:570856 OR reference_no: *570856*)&fq={!join from=debtor_id
to=debt_id fromIndex=dbtr}ssn1:12


However, what is the use case for Solr if you have already a database?
>

The use case is that we have an old search tool that uses the db, but it's
painfully slow, and it doesn't do fuzzy searches very well, or handle
things like searching for phone numbers without it relying on a lot of
regular expressions. A search engine speeds things up, and gets more
precise results.

Thanks,

Rhys