开发者

Apache Solr 4 most functional autosuggest component

Which one of the Solr components is the best:

TermsComponent

works well for us now but with limitations, ie:

- we can't print out the image for associated document in the same response

SpellCheckComponent

will have same limitations as TermsComponent

SearchComponent with NGrams

This one seems to be the step in the right direction but ran into a few limitations as well:

we'd like to be able to show all document grouped by doc type and suggest results in the following format:


Platforms

[IMG] XBOX (12)

[IMG] PS2 (9)


Category

Action - Fighting (20)

Act开发者_Python百科ion - Military (13)


Publisher

[IMG] Sony (20)

[IMG] Microsoft (13)


Games

[IMG] Halo 2

[IMG] Halo 3

suggest Real Product Name + Image + ID + Number of matches sorted by the weight.

Which is more likely to produce best results and minimize the load? We've got just under 25K documents


You should be able to do this with a combination of ngrams, and faceting. You would search against the ngrams to get the documents you want, then use the facet queries to output your results properly.


I wrote a blog post about making auto complete suggestions with Solr. Check it out, it might be useful! I wrote about the following different ways and the related pros and cons:

  • Facet using facet.prefix parameter
  • Ngrams
  • TermsComponent
  • Suggester

Unfortunately there isn't yet a complete solution ready to go, but the article can help you making the right choice depending on your requirements. Since you want to show a complex result and not just words, you should consider using NGrams. It is actually the most flexible solution, and you can combine it with faceting as already mentioned in the other answer you got.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜