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 sraav <ra...@gmail.com> on 2015/03/04 01:40:15 UTC

Solr join + Boost in single query

David,

Is it possible to write a query to join two cores and either bring back data
from the two cores or to boost on the data coming back from either of the
cores? Is that possible with Solr? 

Raavi



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-join-Boost-in-single-query-tp4190825.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr join + Boost in single query

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
if I get you right, "union" query can be achieved by SHOULD clauses:
q=foo {!scorejoin  fromIndex=2nd}bar

On Wed, Mar 4, 2015 at 4:16 PM, sraav <ra...@gmail.com> wrote:

> Yes Mikhail. Similar to the one you mentioned. The only difference is that,
> in my case a uinon between two cores would work too..
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-join-Boost-in-single-query-tp4190825p4190911.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>

Re: Solr join + Boost in single query

Posted by sraav <ra...@gmail.com>.
Yes Mikhail. Similar to the one you mentioned. The only difference is that,
in my case a uinon between two cores would work too..



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-join-Boost-in-single-query-tp4190825p4190911.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr join + Boost in single query

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
sounds like https://issues.apache.org/jira/browse/SOLR-6234 ? doesn't it?

On Wed, Mar 4, 2015 at 3:40 AM, sraav <ra...@gmail.com> wrote:

> David,
>
> Is it possible to write a query to join two cores and either bring back
> data
> from the two cores or to boost on the data coming back from either of the
> cores? Is that possible with Solr?
>
> Raavi
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-join-Boost-in-single-query-tp4190825.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>

Re: Solr join + Boost in single query

Posted by sraav <ra...@gmail.com>.
Or do you think there is a way to do a union between the two cores? 



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-join-Boost-in-single-query-tp4190825p4190860.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr join + Boost in single query

Posted by sraav <ra...@gmail.com>.
Eric,

I am trying to boost the fields that match both the cores to the top of the
list.  Or atleast get a union of the two cores. 

Thanks,
Raavi



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-join-Boost-in-single-query-tp4190825p4190861.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr join + Boost in single query

Posted by Erick Erickson <er...@gmail.com>.
This seems very much like it may be an "XY" problem.
>From Hossman's apache page:

Your question appears to be an "XY Problem" ... that is: you are dealing
with "X", you are assuming "Y" will help you, and you are asking about "Y"
without giving more details about the "X" so that we can understand the
full issue.  Perhaps the best solution doesn't involve "Y" at all?
See Also: http://www.perlmonks.org/index.pl?node_id=542341

So can you back up a bit and state, at a high level, what the problem
you're trying to solve is?

Best,
Erick

On Tue, Mar 3, 2015 at 7:52 PM, sraav <ra...@gmail.com> wrote:
> David,
> Thank you for the reply.
>
> How about boosting on the records that match the both the cores or may be
> boosting on join may be? Is there a way we can do that?
>
> Raav
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Solr-join-Boost-in-single-query-tp4190825p4190852.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr join + Boost in single query

Posted by sraav <ra...@gmail.com>.
David,
Thank you for the reply. 

How about boosting on the records that match the both the cores or may be
boosting on join may be? Is there a way we can do that? 

Raav



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-join-Boost-in-single-query-tp4190825p4190852.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr join + Boost in single query

Posted by David Smiley <ds...@apache.org>.
No, not without writing something custom anyway. It'd be difficult to make it
fast if there's a lot of documents to join on.


sraav wrote
> David,
> 
> Is it possible to write a query to join two cores and either bring back
> data from the two cores or to boost on the data coming back from either of
> the cores? Is that possible with Solr? 
> 
> Raavi





-----
 Author: http://www.packtpub.com/apache-solr-3-enterprise-search-server/book
 Independent Lucene/Solr search consultant, http://www.linkedin.com/in/davidwsmiley
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-join-Boost-in-single-query-tp4190825p4190849.html
Sent from the Solr - User mailing list archive at Nabble.com.