Re: How to solve?
I'll have to not be mobile and thumbing a reply to give a concrete example but you'll need to use the nested query parsing facility to make a boolean AND query of two geofilts or bboxes, each with local params. Erik > On Dec 28, 2016, at 02:12, William Bell wrote: > > We are entering entries into SOLR like the following, and we want to see if > my pt matches any of these radiuses. > > 1. Red, pt=39,-107, radius=10km > 2. Blue, pt=39,-108, radius=50km > > I want to run a SOLR select with a pt=39,-104 and see if it is within 10km > of point 1, and 50km of point 2? > > Usually I know you can : > > http://localhost:8983/select?q=*:*&pt=39,-104&sfield=solr_geohash&d= ?? > > One idea was to use bbox and find the N,S,E,W pt for point 1 and point 2. > But this is not idea, we want to use Great Circle. > > Thoughts? > > > -- > Bill Bell > billnb...@gmail.com > cell 720-256-8076
How to solve?
We are entering entries into SOLR like the following, and we want to see if my pt matches any of these radiuses. 1. Red, pt=39,-107, radius=10km 2. Blue, pt=39,-108, radius=50km I want to run a SOLR select with a pt=39,-104 and see if it is within 10km of point 1, and 50km of point 2? Usually I know you can : http://localhost:8983/select?q=*:*&pt=39,-104&sfield=solr_geohash&d= ?? One idea was to use bbox and find the N,S,E,W pt for point 1 and point 2. But this is not idea, we want to use Great Circle. Thoughts? -- Bill Bell billnb...@gmail.com cell 720-256-8076
Re: How to solve?
Yeah we already use it. I will try to create a custom functionif 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 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 >> 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 >> billnb...@gmail.com >> cell 720-256-8076
Re: How to solve?
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 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 > billnb...@gmail.com > cell 720-256-8076
Re: How to solve?
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 billnb...@gmail.com cell 720-256-8076
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 billnb...@gmail.com cell 720-256-8076