Re: Special character in a field used by sort parameter

2011-05-25 Thread Joey
Marc SCHNEIDER marc.schneider73 at gmail.com writes:

 
 Hi,
 
 I have a field called test-id but I can't use it when sorting, for example :
 Doesn't work : (undefined field test)
 http://localhost:8180/solr/test-public/select/?q=test-id:1sort=test-id+asc
 http://localhost:8180/solr/test-public/select/?q=test-id:1sort=test\-id+asc
 
 When removing the sort parameter then it works...
 
 Is there a way of escaping the field name in sort parameter?
 
 Thanks in advance,
 Marc.
 


I've also got a similar issue. When the field name has a hyphen and the first
character is alphabetical, upon sorting solr says my field is undefined. 

a) It sorts fine when the first character is numerical, and
b) I've tried encoding the url but hyphens don't encode.

If anyone has a fix, I would be stoked to hear it.

J



Re: Special character in a field used by sort parameter

2011-05-20 Thread Jan Høydahl
Have you tried url-encoding? 
http://localhost:8180/solr/test-public/select/?q=test-id:1sort=test%2Did+asc

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

On 19. mai 2011, at 10.50, Marc SCHNEIDER wrote:

 Hi,
 
 I have a field called test-id but I can't use it when sorting, for example :
 Doesn't work : (undefined field test)
 http://localhost:8180/solr/test-public/select/?q=test-id:1sort=test-id+asc
 http://localhost:8180/solr/test-public/select/?q=test-id:1sort=test\-id+asc
 
 When removing the sort parameter then it works...
 
 Is there a way of escaping the field name in sort parameter?
 
 Thanks in advance,
 Marc.