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 William Bell <bi...@gmail.com> on 2014/09/06 07:03:14 UTC

How to solve?

We have a core with each document as a person.

We want to boost based on the sweater color, but if the person has sweaters
in their closet which are the same manufactuer we want to boost even more
by adding them together.

Peter Smit - Sweater: Blue = 1 : Nike, Sweater: Red = 2: Nike, Sweater:
Blue=1 : Polo....
Tony S - Sweater: Red =2: Nike
 Bill O - Sweater:Red = 2: Polo, Blue=1: Polo

Scores:

Peter Smit - 1+2 = 3.
Tony S - 2
Bill O - 2 + 1

I thought about using payloads.

sweaters_payload
Blue: Nike: 1
Red: Nike: 2
Blue: Polo: 1

How do I query this?

http://localhost:8983/solr/persons?q=*:*&sort=??

Ideas?




-- 
Bill Bell
billnbell@gmail.com
cell 720-256-8076

Re: How to solve?

Posted by Bill Bell <bi...@gmail.com>.
Yeah we already use it. I will try to create a custom function....if I get it to work I will post.

The challenge for me is how to dynamically match and add them based in the faceting.

Here is a better example.

The doctor core has payload as name:val. The "name" are doctor specialties. I need to pull back by the name since the user faceted on a specialty. So far payloads work. But the user now wants to facet on another specialty. For example they are looking for a cardiologist and an internal medicine doctor and if the doctor practices at the same hospital I need to take the values and add them. Else take the max value for the 2 specialties. 

Make sense now ?

Seems like I need to create a payload and my own custom function.

Bill Bell
Sent from mobile


> On Sep 6, 2014, at 12:57 PM, Erick Erickson <er...@gmail.com> wrote:
> 
> Here's a blog with an end-to-end example. Jack's right, it takes some
> configuration and having first-class support in Solr would be a good
> thing...
> 
> http://searchhub.org/2014/06/13/end-to-end-payload-example-in-solr/
> 
> Best,
> Erick
> 
>> On Sat, Sep 6, 2014 at 10:24 AM, Jack Krupansky <ja...@basetechnology.com> wrote:
>> Payload really don't have first class support in Solr. It's a solid feature
>> of Lucene, but never expressed well in Solr. Any thoughts or proposals are
>> welcome!
>> 
>> (Hmmm... I wonder what the good folks at Heliosearch have up their sleeves
>> in this area?!)
>> 
>> -- Jack Krupansky
>> 
>> -----Original Message----- From: William Bell
>> Sent: Friday, September 5, 2014 10:03 PM
>> To: solr-user@lucene.apache.org
>> Subject: How to solve?
>> 
>> 
>> We have a core with each document as a person.
>> 
>> We want to boost based on the sweater color, but if the person has sweaters
>> in their closet which are the same manufactuer we want to boost even more
>> by adding them together.
>> 
>> Peter Smit - Sweater: Blue = 1 : Nike, Sweater: Red = 2: Nike, Sweater:
>> Blue=1 : Polo....
>> Tony S - Sweater: Red =2: Nike
>> Bill O - Sweater:Red = 2: Polo, Blue=1: Polo
>> 
>> Scores:
>> 
>> Peter Smit - 1+2 = 3.
>> Tony S - 2
>> Bill O - 2 + 1
>> 
>> I thought about using payloads.
>> 
>> sweaters_payload
>> Blue: Nike: 1
>> Red: Nike: 2
>> Blue: Polo: 1
>> 
>> How do I query this?
>> 
>> http://localhost:8983/solr/persons?q=*:*&sort=??
>> 
>> Ideas?
>> 
>> 
>> 
>> 
>> --
>> Bill Bell
>> billnbell@gmail.com
>> cell 720-256-8076

Re: How to solve?

Posted by Erick Erickson <er...@gmail.com>.
Here's a blog with an end-to-end example. Jack's right, it takes some
configuration and having first-class support in Solr would be a good
thing...

http://searchhub.org/2014/06/13/end-to-end-payload-example-in-solr/

Best,
Erick

On Sat, Sep 6, 2014 at 10:24 AM, Jack Krupansky <ja...@basetechnology.com> wrote:
> Payload really don't have first class support in Solr. It's a solid feature
> of Lucene, but never expressed well in Solr. Any thoughts or proposals are
> welcome!
>
> (Hmmm... I wonder what the good folks at Heliosearch have up their sleeves
> in this area?!)
>
> -- Jack Krupansky
>
> -----Original Message----- From: William Bell
> Sent: Friday, September 5, 2014 10:03 PM
> To: solr-user@lucene.apache.org
> Subject: How to solve?
>
>
> We have a core with each document as a person.
>
> We want to boost based on the sweater color, but if the person has sweaters
> in their closet which are the same manufactuer we want to boost even more
> by adding them together.
>
> Peter Smit - Sweater: Blue = 1 : Nike, Sweater: Red = 2: Nike, Sweater:
> Blue=1 : Polo....
> Tony S - Sweater: Red =2: Nike
> Bill O - Sweater:Red = 2: Polo, Blue=1: Polo
>
> Scores:
>
> Peter Smit - 1+2 = 3.
> Tony S - 2
> Bill O - 2 + 1
>
> I thought about using payloads.
>
> sweaters_payload
> Blue: Nike: 1
> Red: Nike: 2
> Blue: Polo: 1
>
> How do I query this?
>
> http://localhost:8983/solr/persons?q=*:*&sort=??
>
> Ideas?
>
>
>
>
> --
> Bill Bell
> billnbell@gmail.com
> cell 720-256-8076

Re: How to solve?

Posted by Jack Krupansky <ja...@basetechnology.com>.
Payload really don't have first class support in Solr. It's a solid feature 
of Lucene, but never expressed well in Solr. Any thoughts or proposals are 
welcome!

(Hmmm... I wonder what the good folks at Heliosearch have up their sleeves 
in this area?!)

-- Jack Krupansky

-----Original Message----- 
From: William Bell
Sent: Friday, September 5, 2014 10:03 PM
To: solr-user@lucene.apache.org
Subject: How to solve?

We have a core with each document as a person.

We want to boost based on the sweater color, but if the person has sweaters
in their closet which are the same manufactuer we want to boost even more
by adding them together.

Peter Smit - Sweater: Blue = 1 : Nike, Sweater: Red = 2: Nike, Sweater:
Blue=1 : Polo....
Tony S - Sweater: Red =2: Nike
Bill O - Sweater:Red = 2: Polo, Blue=1: Polo

Scores:

Peter Smit - 1+2 = 3.
Tony S - 2
Bill O - 2 + 1

I thought about using payloads.

sweaters_payload
Blue: Nike: 1
Red: Nike: 2
Blue: Polo: 1

How do I query this?

http://localhost:8983/solr/persons?q=*:*&sort=??

Ideas?




-- 
Bill Bell
billnbell@gmail.com
cell 720-256-8076