Re: SOlr Spatial Search - Filter and sort on multiple cities

2019-10-01 Thread anushka gupta
Thanks,

Could you please also let me know how to combine two geofilt fqs because if
i use '&' like :
admin_directory_search_geolocation?q=david=({!geofilt=adminLatLon=33.0198431,-96.6988856=80})+OR+({!geofilt=adminLatLon=50.2171726,8.265894=80})

then it gives me error as it takes ")" paranthesis as part of d=80



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: SOlr Spatial Search - Filter and sort on multiple cities

2019-09-30 Thread Erick Erickson
Well, first of all your first query with the two fq clauses has sort specified 
with a space, rather than an ampersand (&). Twice. Even if that worked, Solr 
would only use one I think.

It’s really unclear what you’re after. It makes no sense to me to specify two 
sorts in a single query, which is what you’re trying to do. You say “Sort the 
results by geoproximity”. Geoproximity to _what_? The firs city? The second? 
Both? Would it make any sense to your users to have a list sorted like

doc 10: 1.0 km from point a
doc 34: 1.1 km from point b
doc 17: 1.2 km from point b
doc 80: 1.3 km from point a

That seems horribly confusing. But if that’s what you want, try something like 
a single sort clause (not two) like: 
=min(geodist(sfield, lat1, lon1),geodist(sfield,lat2,lon2))

> On Sep 30, 2019, at 10:53 AM, anushka gupta 
>  wrote:
> 
> Hi,
> 
> I want to be able to filter on different cities and also sort the results
> based on geoproximity. But sorting doesn’t work:
> 
> admin_directory_search_geolocation?q=david=({!geofilt+sfield=adminLatLon+pt=33.0198431,-96.6988856+d=80+sort=min(geodist(33.0198431,-96.6988856))})+OR+({!geofilt+sfield=adminLatLon+pt=50.2171726,8.265894+d=80+sort=min(geodist(50.2171726,8.265894))})
> 
> Sorting works fine if I add ‘&’ in geofilt condition like :
> q=david={!geofilt=adminLatLon=33.0198431,-96.6988856=80=geodist(33.0198431,-96.6988856)}
> 
> But when I combine the two FQs then sorting doesn’t work.
> 
> Please help.
> 
> 
> 
> 
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html



SOlr Spatial Search - Filter and sort on multiple cities

2019-09-30 Thread anushka gupta
Hi,

I want to be able to filter on different cities and also sort the results
based on geoproximity. But sorting doesn’t work:

admin_directory_search_geolocation?q=david=({!geofilt+sfield=adminLatLon+pt=33.0198431,-96.6988856+d=80+sort=min(geodist(33.0198431,-96.6988856))})+OR+({!geofilt+sfield=adminLatLon+pt=50.2171726,8.265894+d=80+sort=min(geodist(50.2171726,8.265894))})

Sorting works fine if I add ‘&’ in geofilt condition like :
q=david={!geofilt=adminLatLon=33.0198431,-96.6988856=80=geodist(33.0198431,-96.6988856)}

But when I combine the two FQs then sorting doesn’t work.

Please help.




--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: search filter

2013-05-23 Thread Kamal Palei
Looks I am getting exception as below


May 22, 2013 10:52:11 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.NumberFormatException: For input string: [3 TO 9] OR
salary:0
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:438)
at java.lang.Long.parseLong(Long.java:478)


Regards
kamal


On Thu, May 23, 2013 at 11:19 AM, Kamal Palei palei.ka...@gmail.com wrote:

 HI Rafał Kuć
 I tried fq=Salary:[5+TO+10]+OR+Salary:0 and as well as fq=Salary:[5 TO
 10] OR Salary:0  both, both the cases I retrieved 0 results.

 I use drupal along with solr, my code looks as below.

 *   if($include_0_salary == 1)
 {
 $conditions['fq'][0] = 'salary:[' . $min_ctc . '+TO+'
 .
 $max_ctc . ']+OR+salary:0';
 }
 else
 {
 $conditions['fq'][0] = 'salary:[' . $min_ctc . ' TO '
 . $max_ctc . ']';
 }
 $conditions['fq'][1] = 'experience:[' . $min_exp . ' TO '
 . $max_exp . ']';

 $results = apachesolr_search_search_execute($keys,
 $conditions);
 *
 Looks when iclude_0_salary is false, I am getting results as expected.
 If iclude_0_salary is true, I get 0 results, that means for me 
 *$conditions['fq'][0]=
 salary:[5 TO 10] OR salary:0*  did not work.

 Can somebody help me what the wrong I am doing here...

 Best regards
 kamal




 On Wed, May 22, 2013 at 7:00 PM, Rafał Kuć r@solr.pl wrote:

 Hello!

 You can try sending a filter like this fq=Salary:[5+TO+10]+OR+Salary:0

 It should work

 --
 Regards,
  Rafał Kuć
  Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
 ElasticSearch

  Dear All
  Can I write a search filter for a field having a value in a range or a
  specific value.

  Say if I want to have a filter like
  1. Select profiles with salary 5 to 10  or Salary 0.

  So I expect profiles having salary either 0 , 5, 6, 7, 8, 9, 10 etc.

  It should be possible, can somebody help me with syntax of 'fq' filter
  please.

  Best Regards
  kamal





Re: search filter

2013-05-23 Thread Gora Mohanty
On 23 May 2013 11:19, Kamal Palei palei.ka...@gmail.com wrote:
 HI Rafał Kuć
 I tried fq=Salary:[5+TO+10]+OR+Salary:0 and as well as fq=Salary:[5 TO 10]
 OR Salary:0  both, both the cases I retrieved 0 results.
[...]

Please try the suggested filter query from the
Solr admin. interface, or by typing it directly
into the browser URL bar. My guess is that
there is still some issue with your Drupal/Solr
integration.

Regards,
Gora


search filter

2013-05-22 Thread Kamal Palei
Dear All
Can I write a search filter for a field having a value in a range or a
specific value.

Say if I want to have a filter like
1. Select profiles with salary 5 to 10  or Salary 0.

So I expect profiles having salary either 0 , 5, 6, 7, 8, 9, 10 etc.

It should be possible, can somebody help me with syntax of 'fq' filter
please.

Best Regards
kamal


Re: search filter

2013-05-22 Thread Rafał Kuć
Hello!

You can try sending a filter like this fq=Salary:[5+TO+10]+OR+Salary:0

It should work

-- 
Regards,
 Rafał Kuć
 Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

 Dear All
 Can I write a search filter for a field having a value in a range or a
 specific value.

 Say if I want to have a filter like
 1. Select profiles with salary 5 to 10  or Salary 0.

 So I expect profiles having salary either 0 , 5, 6, 7, 8, 9, 10 etc.

 It should be possible, can somebody help me with syntax of 'fq' filter
 please.

 Best Regards
 kamal



Re: search filter

2013-05-22 Thread Kamal Palei
HI Rafał Kuć
I tried fq=Salary:[5+TO+10]+OR+Salary:0 and as well as fq=Salary:[5 TO 10]
OR Salary:0  both, both the cases I retrieved 0 results.

I use drupal along with solr, my code looks as below.

*   if($include_0_salary == 1)
{
$conditions['fq'][0] = 'salary:[' . $min_ctc . '+TO+' .
$max_ctc . ']+OR+salary:0';
}
else
{
$conditions['fq'][0] = 'salary:[' . $min_ctc . ' TO ' .
$max_ctc . ']';
}
$conditions['fq'][1] = 'experience:[' . $min_exp . ' TO ' .
$max_exp . ']';

$results = apachesolr_search_search_execute($keys,
$conditions);
*
Looks when iclude_0_salary is false, I am getting results as expected.
If iclude_0_salary is true, I get 0 results, that means for me
*$conditions['fq'][0]=
salary:[5 TO 10] OR salary:0*  did not work.

Can somebody help me what the wrong I am doing here...

Best regards
kamal




On Wed, May 22, 2013 at 7:00 PM, Rafał Kuć r@solr.pl wrote:

 Hello!

 You can try sending a filter like this fq=Salary:[5+TO+10]+OR+Salary:0

 It should work

 --
 Regards,
  Rafał Kuć
  Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

  Dear All
  Can I write a search filter for a field having a value in a range or a
  specific value.

  Say if I want to have a filter like
  1. Select profiles with salary 5 to 10  or Salary 0.

  So I expect profiles having salary either 0 , 5, 6, 7, 8, 9, 10 etc.

  It should be possible, can somebody help me with syntax of 'fq' filter
  please.

  Best Regards
  kamal




Building a facet search filter frontend in XSLT

2011-06-29 Thread Filype Pereira
Hi all,

I am looking for some help in building a front end facet filter using XSLT.

The code I use is: http://pastebin.com/xVv9La9j

On the image attached, the checkbox should be selected. (You clicked and
submited the facet form. The URL changed)

I can use xsl:if, but there's nothing that I can use on the XML that will
let me test before outputting the input checkbox.

Has anyone done any similar thing?

I haven't seen any examples building a facet search filter frontend in XSLT,
the example.xsl that comes with solr is pretty basic, are there any other
examples in XSLT implementing the facet filters around?

Thanks,

Filype


Re: Building a facet search filter frontend in XSLT

2011-06-29 Thread lee carroll
Hi Filype,

in the response you should have a list of fq arguments something like
arr name=fq
strfield:facetValue/str
strfield:FacetValue/str
/arr

use this to set your inputs to be selected / checked



On 29 June 2011 23:54, Filype Pereira pereira.fil...@gmail.com wrote:
 Hi all,
 I am looking for some help in building a front end facet filter using XSLT.
 The code I use is: http://pastebin.com/xVv9La9j
 On the image attached, the checkbox should be selected. (You clicked and
 submited the facet form. The URL changed)
 I can use xsl:if, but there's nothing that I can use on the XML that will
 let me test before outputting the input checkbox.
 Has anyone done any similar thing?
 I haven't seen any examples building a facet search filter frontend in XSLT,
 the example.xsl that comes with solr is pretty basic, are there any other
 examples in XSLT implementing the facet filters around?
 Thanks,
 Filype