lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: autosuggest combination of data from documents and popular queries
Date Thu, 29 Sep 2011 01:19:58 GMT

: If user starts typing "m" i wil show "mango" as suggestion. And other
: suggestions should come from the document title in index. So if I have a
: document in index with title "Man .." so suggestions would be
: "mango"
: "man"
: Is this doable ? any options ?

It's totally doable, and you've already done the hard part by building up 
a database of the "popular" queries you want to seed the suggestions with, 
abd building up an "suggestion" index where each document corrisponds to a 
single suggestion.
but in order to also have suggestions come from the fields of your 
"main" index, you'll need to also add them as individual documents to that same 
"suggestion" index.

you could either get those field values from whatever original source you 
used, or you crawl your own solr index.  If you want individual *terms* 
from the index to be added as suggestions, then the LukeRequestHandler or 
the TermsComponent would probably be the easiest way to extract them.


View raw message