semicolon causing Missing sort order exception

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

semicolon causing Missing sort order exception

iorixxx
Today I found something very interesting. When i search a word (solr; lucene) ending with a semicolon plus any character (from solr admin page), solr gives an exception (HTTP Status 400 - Missing sort order).
When I escaped semicolon (solr\;lucene) exception gone.

I checked Lucene Special Characters that are part of the query syntax. Semicolon (;) is not in the list.

I wanted to share this with you.


     
Reply | Threaded
Open this post in threaded view
|

Re: semicolon causing Missing sort order exception

Erik Hatcher
semicolon is legacy syntax in Solr only for specifying a sort.  It is  
not part of the actual query parser syntax, but rather parsed  
separately.

What version of Solr are you using?  The semicolon sort support in the  
query string is supposed to be deprecated/removed, I believe, in the  
default query parser but looks like it still is checked under certain  
conditions.

        Erik

On Feb 18, 2009, at 9:11 AM, AHMET ARSLAN wrote:

> Today I found something very interesting. When i search a word  
> (solr; lucene) ending with a semicolon plus any character (from solr  
> admin page), solr gives an exception (HTTP Status 400 - Missing sort  
> order).
> When I escaped semicolon (solr\;lucene) exception gone.
>
> I checked Lucene Special Characters that are part of the query  
> syntax. Semicolon (;) is not in the list.
>
> I wanted to share this with you.
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: semicolon causing Missing sort order exception

iorixxx
> What version of Solr are you using?
I am using latest release (apache-solr-1.3.0)


     
Reply | Threaded
Open this post in threaded view
|

Re: semicolon causing Missing sort order exception

Yonik Seeley
On Wed, Feb 18, 2009 at 10:07 AM, AHMET ARSLAN <[hidden email]> wrote:
>> What version of Solr are you using?
> I am using latest release (apache-solr-1.3.0)

As Erik points out, it's the legacy sort syntax.
set defType to "lucene" as a default parameter to fix that.

-Yonik
http://www.lucidimagination.com