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 hungctk33 <no...@gmail.com> on 2014/04/23 03:46:08 UTC

Join solr

Hi all,
A problem .

http://localhost:8081/solr/products/select?q={!join%20from=category_id%20to=category_id%20fromIndex=categories}yyy


-yyy : &sort= category_name+desc

You have a query for problem. Help me 



--
View this message in context: http://lucene.472066.n3.nabble.com/Join-solr-tp4132615.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Join solr

Posted by hungctk33 <no...@gmail.com>.
Thanks reply !
I use Solr to name products for storing search information, and core
categories I use for reference, because it CATEGORY_NAME fields. 
to use the sort asc | desc. 
If so, the field CATEGORY_NAME on products later CATEGORY_NAME I edit. with
10 million rows is very dangerous.



-----
I am a student IT
--
View this message in context: http://lucene.472066.n3.nabble.com/Join-solr-to-use-sorting-tp4132615p4133049.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Join solr

Posted by Aman Tandon <am...@gmail.com>.
First of all here are the something that might help others to understand
your problem.

   - what is your current logic
   - what you are trying to achieve?
   - what problem you are facing in achieving the results?
   - mail's subject

I am not familiar that we can do sort by query of the results returned by
the join of two collections, so no comments for that, but if we can others
can share with us.

I guess you might be using the result returned from in your code, so you
can sort it manually on category name if it doesn't take extra costly
 efforts.


With Regards
Aman Tandon


On Thu, Apr 24, 2014 at 11:16 PM, hungctk33 <no...@gmail.com> wrote:

> Thanks Kranti Parisa !
>
> I have 2 core :
>
> products(id, product_name, category_id );
> categories(category_id, category_name);
>
> query similar SQL:
> SELECT p.* from Products AS p
> Inner join Categories AS c
> ON p.category_id = c.category_id
> Order by c.category_name asc;
>
>
> Purpose sorting by category_name, but join solr not support to use sort.
> If custom solr, how do it ?
>
> Thank a lot of !
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Join-solr-tp4132615p4132933.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Join solr

Posted by hungctk33 <no...@gmail.com>.
Thanks Kranti Parisa !

I have 2 core :

products(id, product_name, category_id );
categories(category_id, category_name);

query similar SQL:
SELECT p.* from Products AS p
Inner join Categories AS c
ON p.category_id = c.category_id
Order by c.category_name asc;


Purpose sorting by category_name, but join solr not support to use sort.
If custom solr, how do it ?

Thank a lot of !



--
View this message in context: http://lucene.472066.n3.nabble.com/Join-solr-tp4132615p4132933.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Join solr

Posted by Kranti Parisa <kr...@gmail.com>.
Can you describe what is your business requirement (how'z your data
indexed, what is the request and what should be the response). and give us
some examples.

If you want to sort the results of the first core based on the sorting
preference of the second core that you are joining with, that doesn't work
on the fly. you will need to write custom code

Thanks,
Kranti K. Parisa
http://www.linkedin.com/in/krantiparisa



On Thu, Apr 24, 2014 at 6:11 AM, hungctk33 <no...@gmail.com> wrote:

> Pls! Help me.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Join-solr-tp4132615p4132830.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Join solr

Posted by hungctk33 <no...@gmail.com>.
Pls! Help me. 



--
View this message in context: http://lucene.472066.n3.nabble.com/Join-solr-tp4132615p4132830.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Join solr

Posted by hungctk33 <no...@gmail.com>.
http://localhost:8081/solr/products/select?q={!join+from=category_id+to=category_id
fromIndex=categories v=$vk}*:*&vk=(sort= category_name+desc)

products( id, name, category_id);
categories( category_id, category_name)

order by desc|asc category_name





--
View this message in context: http://lucene.472066.n3.nabble.com/Join-solr-tp4132615p4132631.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Join solr

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Sorry, it is not clear what the issue actually is, what you tried to
do to solve it and where specifically you are stuck.

Please review http://wiki.apache.org/solr/UsingMailingLists , it will
help you to ask a better question and get a better answer. Start from
better subject once you reviewed the guidelines.

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency


On Wed, Apr 23, 2014 at 10:24 AM, hungctk33 <no...@gmail.com> wrote:
> Pls, Help me !
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Join-solr-tp4132615p4132625.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: Join solr

Posted by hungctk33 <no...@gmail.com>.
Pls, Help me !



--
View this message in context: http://lucene.472066.n3.nabble.com/Join-solr-tp4132615p4132625.html
Sent from the Solr - User mailing list archive at Nabble.com.