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 2011/09/01 04:58:42 UTC

geodist() parameters?

I want to go a geodist() calculation on 2 different sfields. How would
I do that?

http://localhost:8983/solr/select?q={!func}add(geodist(),geodist())&fq={!geofilt}&pt=39.86347,-105.04888&d=100&sfield=store_lat_lon

But I really want geodist() for one pt, and another geodist() for another pt.

Can I do something like geodist(store_lat_lon,39.86347,-105.04888,100) ?



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

Re: geodist() parameters?

Posted by William Bell <bi...@gmail.com>.
I just updated the Wiki with the parameters for geodist()

http://wiki.apache.org/solr/SpatialSearch


On Thu, Sep 1, 2011 at 3:10 PM, Juan Grande <ju...@gmail.com> wrote:
> Hi Bill,
>
> As far as I know, you can pass a completely different set of parameters to
> each of the functions/filters. For example:
>
> http://localhost:8983/solr/select?q={!func}add(geodist(field1, 10,
> -10),geodist(field2, 20, -20))&fq={!geofilt sfield=field3 pt=30,-30
> d=100}<http://localhost:8983/solr/select?q=%7B%21func%7Dadd%28geodist%28%29,geodist%28%29%29&fq=%7B%21geofilt%7D&pt=39.86347,-105.04888&d=100&sfield=store_lat_lon>
>
> Let me know if this solved your problem!
>
> *Juan*
>
>
>
> On Wed, Aug 31, 2011 at 11:58 PM, William Bell <bi...@gmail.com> wrote:
>
>> I want to go a geodist() calculation on 2 different sfields. How would
>> I do that?
>>
>>
>> http://localhost:8983/solr/select?q={!func}add(geodist(),geodist())&fq={!geofilt}&pt=39.86347,-105.04888&d=100&sfield=store_lat_lon
>>
>> But I really want geodist() for one pt, and another geodist() for another
>> pt.
>>
>> Can I do something like geodist(store_lat_lon,39.86347,-105.04888,100) ?
>>
>>
>>
>> --
>> Bill Bell
>> billnbell@gmail.com
>> cell 720-256-8076
>>
>



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

RE: copying one field to another using regex

Posted by "Jaeger, Jay - DOT" <Ja...@dot.wi.gov>.
Not quite sure what you are asking.

You can certainly use copyField to copy a field, and then apply regex on the destination field's fieldType.  We do that.

JRJ

-----Original Message-----
From: alxsss@aim.com [mailto:alxsss@aim.com] 
Sent: Thursday, September 01, 2011 4:16 PM
To: solr-user@lucene.apache.org
Subject: copying one field to another using regex

Hello,

Is it possible to create a copy field from another by applying a regex or a function to source.

Thanks.
Alex.

Re: copying one field to another using regex

Posted by Markus Jelsma <ma...@openindex.io>.
No, field data is copied verbatim. Copy the field and strip what you don't 
need.

> Hello,
> 
> Is it possible to create a copy field from another by applying a regex or a
> function to source.
> 
> Thanks.
> Alex.

copying one field to another using regex

Posted by al...@aim.com.
Hello,

Is it possible to create a copy field from another by applying a regex or a function to source.

Thanks.
Alex.

Re: geodist() parameters?

Posted by Juan Grande <ju...@gmail.com>.
Hi Bill,

As far as I know, you can pass a completely different set of parameters to
each of the functions/filters. For example:

http://localhost:8983/solr/select?q={!func}add(geodist(field1, 10,
-10),geodist(field2, 20, -20))&fq={!geofilt sfield=field3 pt=30,-30
d=100}<http://localhost:8983/solr/select?q=%7B%21func%7Dadd%28geodist%28%29,geodist%28%29%29&fq=%7B%21geofilt%7D&pt=39.86347,-105.04888&d=100&sfield=store_lat_lon>

Let me know if this solved your problem!

*Juan*



On Wed, Aug 31, 2011 at 11:58 PM, William Bell <bi...@gmail.com> wrote:

> I want to go a geodist() calculation on 2 different sfields. How would
> I do that?
>
>
> http://localhost:8983/solr/select?q={!func}add(geodist(),geodist())&fq={!geofilt}&pt=39.86347,-105.04888&d=100&sfield=store_lat_lon
>
> But I really want geodist() for one pt, and another geodist() for another
> pt.
>
> Can I do something like geodist(store_lat_lon,39.86347,-105.04888,100) ?
>
>
>
> --
> Bill Bell
> billnbell@gmail.com
> cell 720-256-8076
>