You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mysurf Mail <st...@gmail.com> on 2013/09/02 17:41:37 UTC

solr suggestion -

the following request
http://127.0.0.1:8983/solr/vault/suggest?wt=json&q=at%20l


Returns phrases that starts with at and with l (as shown below )
Now, what if I want phrases that starts with "At l" such as "At Least..."
Thanks.


{

   - responseHeader:
   {
      - status: 0,
      - QTime: 1
      },
   - spellcheck:
   {
      - suggestions:
      [
         - "at",
         -
         {
            - numFound: 1,
            - startOffset: 1,
            - endOffset: 3,
            - suggestion:
            [
               - "atrion"
               ]
            },
         - "l",
         -
         {
            - numFound: 2,
            - startOffset: 4,
            - endOffset: 5,
            - suggestion:
            [
               - "lot",
               - "loadtest_template_700"
               ]
            },
         - "collation",
         - ""atrion lot""
         ]
      }

}

Re: solr suggestion -

Posted by Mysurf Mail <st...@gmail.com>.
Yes.
I understood that from the result.
But how do I change that behaviour?

"Don't do any analysis on the field you are using for suggestion"

Please elaborate.


On Mon, Sep 9, 2013 at 8:48 PM, tamanjit.bindra@yahoo.co.in <
tamanjit.bindra@yahoo.co.in> wrote:

> Don't do any analysis on the field you are using for suggestion. What is
> happening here is that query time and indexing time the tokens are being
> broken on white space. So effectively, "at" is being taken as one token and
> "l" is being taken as another token for which you get two different
> suggestions.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/solr-suggestion-tp4087841p4088919.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: solr suggestion -

Posted by "tamanjit.bindra@yahoo.co.in" <ta...@yahoo.co.in>.
Don't do any analysis on the field you are using for suggestion. What is
happening here is that query time and indexing time the tokens are being
broken on white space. So effectively, "at" is being taken as one token and
"l" is being taken as another token for which you get two different
suggestions.



--
View this message in context: http://lucene.472066.n3.nabble.com/solr-suggestion-tp4087841p4088919.html
Sent from the Solr - User mailing list archive at Nabble.com.