tamaramata / solrnet

Automatically exported from code.google.com/p/solrnet
0 stars 0 forks source link

Add support for multiple results in spellcheck.collate #211

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Given appropriate document in Solr index, Spell check query with word like 
"innuvative natbook" offer two collate suggestion in solr, i.e. "innovative 
netbook" and "innovative notebook".
2. Try to fetch the collate suggestion using Solrnet, and you'll get only the 
first no matter how many are suggested by Solr.

What is the expected output? What do you see instead?

The expected output is to fetch all the suggestions.

Please use labels and text to provide additional information.

The issue is with declaring the collate in the solr net, which is not a 
collection. 

Hope you can fix it asap.

Thanks,

Krunal

http://www.nopAccelerate.com/

Original issue reported on code.google.com by jariwala...@gmail.com on 14 Jun 2013 at 3:32

GoogleCodeExporter commented 8 years ago
What version of SolrNet are you using? Could you please post the XML response 
from Solr?

Original comment by mauricio...@gmail.com on 15 Jun 2013 at 4:30

GoogleCodeExporter commented 8 years ago
Hi, Here it is...

SolrNet version : 0.4.0.2002

Solr Query : 
http://localhost:8983/solr/core-test/select?q=innuvative%20natbook&spellcheck=tr
ue&Collate=true

XML Response :

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <lst name="responseHeader">
        <int name="status">0</int>
        <int name="QTime">16</int>
    </lst>
    <result name="response" numFound="0" start="0" />
    <lst name="spellcheck">
        <lst name="suggestions">
            <lst name="innuvative">
                <int name="numFound">1</int>
                <int name="startOffset">0</int>
                <int name="endOffset">10</int>
                <arr name="suggestion">
                    <str>innovative</str>
                </arr>
            </lst>
            <lst name="natbook">
                <int name="numFound">2</int>
                <int name="startOffset">11</int>
                <int name="endOffset">18</int>
                <arr name="suggestion">
                    <str>netbook</str>
                    <str>notebook</str>
                </arr>
            </lst>
            <str name="collation">innovative netbook</str>
            <str name="collation">innovative notebook</str>
        </lst>
    </lst>
</response>

Hope it helps. Let me know if you need more information. 

Thanks,

http://www.nopaccelerate.com/

Original comment by jariwala...@gmail.com on 17 Jun 2013 at 4:40

GoogleCodeExporter commented 8 years ago
SolrNet does not currently support multiple collations. 
SpellCheckResponseParser and SpellCheckResults should be modified to support 
this. 

To avoid multiple breaking changes, things should be changed to support 
extended results as well ( 
http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.collateExtendedResult
s ).

New objects encapsulating this data should be immutable.

The patch/pull request must include tests for the cases of single collation, 
multiple simple collation, and multiple extended collations.

There was a pull request for this some time ago, but it lacked tests and 
objects were not immutable: https://github.com/mausch/SolrNet/pull/24 , still 
it could be used as reference.

Original comment by mauricio...@gmail.com on 18 Jun 2013 at 4:06

GoogleCodeExporter commented 8 years ago
Hi, thank you for your response... 
Does it mean you are adding this feature?

Original comment by jariwala...@gmail.com on 20 Jun 2013 at 1:25

GoogleCodeExporter commented 8 years ago
No, it means I'm outlining how to do it for anyone interested in implementing 
it.

Original comment by mauricio...@gmail.com on 20 Jun 2013 at 1:40

GoogleCodeExporter commented 8 years ago
Moved to https://github.com/mausch/SolrNet/issues/110

Original comment by mauricio...@gmail.com on 9 Sep 2013 at 8:45