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 wakemaster 39 <wa...@z33k.com> on 2011/04/27 04:25:54 UTC

Suggester or spellcheck return stored fields

Hello all,

I am trying to build an autocomplete solution for a website that I run. The
current implementation of it is going to be used on who you want to send
PM's too. I have it basically working up to this point, The UI is done and
the suggester is working in returning possible solutions without any major
problems. The problem I am currently running into is that the suggestions it
is returning are not necessarily unique.

To solve this, I would like to return the user ID (a stored field) along
with the suggestion. This would help in other areas but would ensure things
are unique. Is it possible to make suggester to return these other fields or
is it strictly returning text as I assume is the case. I know I am likely
stretching what the suggester is suppose to do, so I am ok rolling back to a
different plan using normal queries. But would prefer to be able to use
suggester if possible.

Thanks for the help,

Cameron

Re: Suggester or spellcheck return stored fields

Posted by Erick Erickson <er...@gmail.com>.
Hmmm, I don't quite get how this would work. There is really no association
between terms from one field and terms from another. As I read your message,
you have a PM from user1 with a term in some field of interest, call it
"suggestion". A PM from user2 also has the term "suggestion". Now you want
the suggester to return suggestion:user1 suggestion:user2? If this is accurate
then  I believe you'd have to index them that way because there's no way I know
of of efficiently unwinding a term from the inverted index to associate it with
a document, then another field in that document.

If I've misunderstood your need, could you elaborate?

Best
Erick

On Tue, Apr 26, 2011 at 10:25 PM, wakemaster 39 <wa...@z33k.com> wrote:
> Hello all,
>
> I am trying to build an autocomplete solution for a website that I run. The
> current implementation of it is going to be used on who you want to send
> PM's too. I have it basically working up to this point, The UI is done and
> the suggester is working in returning possible solutions without any major
> problems. The problem I am currently running into is that the suggestions it
> is returning are not necessarily unique.
>
> To solve this, I would like to return the user ID (a stored field) along
> with the suggestion. This would help in other areas but would ensure things
> are unique. Is it possible to make suggester to return these other fields or
> is it strictly returning text as I assume is the case. I know I am likely
> stretching what the suggester is suppose to do, so I am ok rolling back to a
> different plan using normal queries. But would prefer to be able to use
> suggester if possible.
>
> Thanks for the help,
>
> Cameron
>