Subquery substitution for pt

2017-05-11 Thread jotpe
Dear list,

i work a lot with subqueries. And its Wirkung fine for me. 
Now I ran into the problem, that the qt parameter for the geodist() function 
rejects to use the document field coordinate as inputvalue for my subquery.

I want somethong linke this

fl=n:[subquery],name&n.pt=${row.coordinate}&n.sort=geodist() 
asc&n.sfield=coordinate

Is this possible without a second query?
Best regards.



Re: Subquery substitution for pt

2017-05-11 Thread jotpe
A InvalidShapeException is thrown: Point must be in 'lat, lon' or 'x y' format

I can see in the after this error, that in /select is an 
&row.coordinate=50.9,6.9 in the params{} section.

But the parameter qt stays empty.   ...&pt=&q=*:*

Am 11. Mai 2017 14:42:41 MESZ schrieb Mikhail Khludnev :
>What does appear in logs? It should log subquery request param right
>after
>an exception (if there is an exception).
>
>On Thu, May 11, 2017 at 1:36 PM, jotpe  wrote:
>
>> Dear list,
>>
>> i work a lot with subqueries. And its Wirkung fine for me.
>> Now I ran into the problem, that the qt parameter for the geodist()
>> function rejects to use the document field coordinate as inputvalue
>for my
>> subquery.
>>
>> I want somethong linke this
>>
>> fl=n:[subquery],name&n.pt=${row.coordinate}&n.sort=geodist()
>> asc&n.sfield=coordinate
>>
>> Is this possible without a second query?
>> Best regards.
>>
>>
>
>
>-- 
>Sincerely yours
>Mikhail Khludnev


Re: Subquery substitution for pt

2017-05-11 Thread jotpe
Thank you. Okay, so you think, this should work, too.

Best regards Johannes

Am 11. Mai 2017 17:14:45 MESZ schrieb Mikhail Khludnev :
>Can't say anything. Just raised
>https://issues.apache.org/jira/browse/SOLR-10673.
>
>On Thu, May 11, 2017 at 4:13 PM, jotpe  wrote:
>
>> A InvalidShapeException is thrown: Point must be in 'lat, lon' or 'x
>y'
>> format
>>
>> I can see in the after this error, that in /select is an
>> &row.coordinate=50.9,6.9 in the params{} section.
>>
>> But the parameter qt stays empty.   ...&pt=&q=*:*
>>
>> Am 11. Mai 2017 14:42:41 MESZ schrieb Mikhail Khludnev
>:
>> >What does appear in logs? It should log subquery request param right
>> >after
>> >an exception (if there is an exception).
>> >
>> >On Thu, May 11, 2017 at 1:36 PM, jotpe  wrote:
>> >
>> >> Dear list,
>> >>
>> >> i work a lot with subqueries. And its Wirkung fine for me.
>> >> Now I ran into the problem, that the qt parameter for the
>geodist()
>> >> function rejects to use the document field coordinate as
>inputvalue
>> >for my
>> >> subquery.
>> >>
>> >> I want somethong linke this
>> >>
>> >> fl=n:[subquery],name&n.pt=${row.coordinate}&n.sort=geodist()
>> >> asc&n.sfield=coordinate
>> >>
>> >> Is this possible without a second query?
>> >> Best regards.
>> >>
>> >>
>> >
>> >
>> >--
>> >Sincerely yours
>> >Mikhail Khludnev
>>
>
>
>
>-- 
>Sincerely yours
>Mikhail Khludnev


Fwd: facet.pivot and facet.sort does not work with fq

2013-06-26 Thread jotpe
Hello again!

The missing pivot facet when sorting by index can also be repeated in solr
4.3.1
Does anyone have an idea, how to debug this?

Best regards Johannes

-- Forwarded message --
From: jotpe 
Date: 2013/6/25
Subject: facet.pivot and facet.sort does not work with fq
To: solr-user@lucene.apache.org


Hello

I'm trying to display a hierachical structur with a facet.pivot, which
should be sorted by index.
I followed the idea
fromhttp://wiki.apache.org/solr/HierarchicalFaceting#Pivot_Facets and
created
"path_levelX" fields from 0 to 7.

My tokens are not unique per level and i need to sort it like in the
original structure. So i added a prefix with a sortorder number with static
length and an unique id (always 8 nums). Later this prefix will be hide by
using substring.
Format: SORTORDER/UNIQUE_ID/NAME_TO_DISPLAY

example:
path_level0:"000/123/Chief"
path_level0:"000/123/Chief"  path_level1:"000/124/Staff"
path_level0:"000/123/Chief"  path_level1:"000/124/Staff"
path_level2:"00/125/Chief"
path_level0:"001/126/Legal Adviser"


Displaying the pivot works fine.

Sorted by count OK
 
http://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=count
Sorted by index OK
 
http://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=index


Now I must reduce my global structure to one office by using the fq parameter.

Reduced to one office, sorted by count OK
 
http://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=count&fq=office:xyz
Reduced to one office, sorted by index : failure
 
http://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=count&fq=office:xyz

The facet.pivot elements stays empty. So what is wrong?



Maybe this is a bug... On the other hand, maybe this is a bad way to obtain
a hierchacial structure with a custom sort. Better ideas?

Best regards Johannes


facet.pivot and facet.sort does not work with fq

2013-06-24 Thread jotpe
Hello

I'm trying to display a hierachical structur with a facet.pivot, which
should be sorted by index.
I followed the idea
fromhttp://wiki.apache.org/solr/HierarchicalFaceting#Pivot_Facets and
created
"path_levelX" fields from 0 to 7.

My tokens are not unique per level and i need to sort it like in the
original structure. So i added a prefix with a sortorder number with static
length and an unique id (always 8 nums). Later this prefix will be hide by
using substring.
Format: SORTORDER/UNIQUE_ID/NAME_TO_DISPLAY

example:
path_level0:"000/123/Chief"
path_level0:"000/123/Chief"  path_level1:"000/124/Staff"
path_level0:"000/123/Chief"  path_level1:"000/124/Staff"
path_level2:"00/125/Chief"
path_level0:"001/126/Legal Adviser"


Displaying the pivot works fine.

Sorted by count
OKhttp://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=count
Sorted by index
OKhttp://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=index


Now I must reduce my global structure to one office by using the fq
parameter.

Reduced to one office, sorted by count
OKhttp://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=count&fq=office:xyz
Reduced to one office, sorted by index :
failurehttp://localhost:8080/solr/collection1/select?wt=xml&q=*:*&rows=2&facet=on&facet.pivot=path_level1,path_level2,path_level3&facet.pivot.mincount=1&facet.sort=count&fq=office:xyz

The facet.pivot elements stays empty. So what is wrong?



Maybe this is a bug... On the other hand, maybe this is a bad way to obtain
a hierchacial structure with a custom sort. Better ideas?

Best regards Johannes