Hey, the way the completion suggester is implemented, it does not support filtering by types (neither does the suggest plugin) - so this makes a pretty clear decision process for your use-case. The reason for this, is the different approach how suggest data is stored and queried - in a nutshell, the suggest data structure simply takes the whole index data and uses it for suggestions. The type itself is simply spoken just another metadata, which cannot be filtered out.
I'd go with the completion suggester if possible (as I wrote the suggest plugin I can tell that the completion suggester has a way better design, and, obviously, is part of the core). Hope this helps... --Alex On Tue, Dec 24, 2013 at 4:50 PM, Facundo Olano <[email protected]>wrote: > Hello, I've started playing around with the completion suggester to > implement autocomplete functionality in my application and found it pretty > straightforward and simple to use. > > The problem I have is that I don't want mixed types in my suggestions: if > have a "music" index with "song" and "artist" types, I want to have "song" > and "artist" autocompletes. From the documentation I get that this doesn't > seem to be supported, so I'm considering having a separate index for each > type. I've > read<http://elasticsearch-users.115913.n3.nabble.com/More-indices-vs-more-types-td3999423.html#a4002051>that > this is not the best practice, but from the size of my data I presume > I won't be having problems: I have around 10 types, most of them with > around 2000 documents. It's worth noting that I'm just using elasticsearch > for this autocomplete functionality (although I may use it for regular > search eventually). > > So I wanted to check if it makes sense modeling my indices that way or if > there's an alternative solution to my problem (for example, using the suggest > plugin <https://github.com/spinscale/elasticsearch-suggest-plugin>?) > > Thanks, > Facundo. > > -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/65d950a0-0784-46eb-94c3-7689ab858fe2%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9E1D57m%2B1d8HM2jfyawo3COuadybgds2LhzoQv3Lw86w%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
