[ 
https://issues.apache.org/jira/browse/SOLR-1063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682269#action_12682269
 ] 

Markus commented on SOLR-1063:
------------------------------

Yonik,


It is the boolean, only in the spellcheck result, that it erroneous:
s:16:"correctlySpelled";falses:9:"collation";s:9:"groningen";}}}

The line below is correct:
s:16:"correctlySpelled";s:5:"false";s:9:"collation";s:9:"groningen";}}}

Typically, in PHP, a serialized format consists of roughly the following
elements where both key and value follow the same format
TYPE_IDENTIFIER:LENGTH_OF_VALUE:"VALUE";

Two of these strings combined make a key/value pair.


The boolean, how queer, is here represented as a string, thus true and
false values respectively should be:
s:4:"true";
s:5:"false";


As you can see, the false in the bad string needs something prefixed and
suffixed
prefix: s:5:"
suffix: ";


FYI, other booleans from different parts of Solr give good results, it
is only here in the spellchecker as far as we've seen. 



Regards,
Markus




> Spellchecker result through wt=phps and wt=php
> ----------------------------------------------
>
>                 Key: SOLR-1063
>                 URL: https://issues.apache.org/jira/browse/SOLR-1063
>             Project: Solr
>          Issue Type: Bug
>          Components: spellchecker
>    Affects Versions: 1.3
>         Environment: Debian Etch with Tomcat6 and Solr1.3
>            Reporter: Markus
>
> First of all, this is not through the provided PHP client but these are the 
> actual results directly from Solr therefore the selected component is not 
> Client/PHP but spellchecker. However, results like these are likely to be 
> caused by the selected responsewriter since similar issues have been seen.
> There seems to be a bug in the PHPS outputHandler when retrieving a
> query that also produces spellcheck results.
> The following query fails to return an unserializable string:
> spellcheck=true&facet=true&indent=on&facet.mincount=1&spellcheck.extendedResults=true&
> spellcheck.q=groninen&spellcheck.collate=true&wt=phps&rows=8&start=0&
> q=generic_search:groninen&spellcheck.dictionary=jarowinkler&
> facet.field=city&facet.field=kitchen&facet.field=budget
> The problem is clearly visible at the end of the returned string:
> rectlySpelled";falses:9:"collation";s:9:"groningen";}}}
> The query works fine when extendedResults=false, otherwise this problem
> occurs.
> Using the PHP outputHandler instead also produces a result which i
> cannot pass through eval. It complains about the last line of the result
> which omits the semi colon.
>  'word'=>'groningen')),
>         'correctlySpelled'=>false,
>         'collation'=>'groningen')))
> It would also need a return statement to begin with in order to produce
> any results with eval. For a - simple - query to work properly you would
> need : 
> $data = file_get_contents(query);
> var_dump(eval("return $data;"));

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to