Re: How to return more fields on Solr 4.5.1 Suggester?
Hey Omer, Create a copy movie_title and use edgy_text described here : http://searchhub.org/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/ With this approach you can request whatever field you want with fl parameter. Ahmet On Monday, March 17, 2014 3:48 PM, Erick Erickson erickerick...@gmail.com wrote: Perhaps index the concatenation of the two fields, something like this: hard rain (1998)!14 Then have the app layer peel off the !14 for displaying the title to the user. Then use the 14 however you need to. Best, Erick On Mon, Mar 17, 2014 at 6:28 AM, Lajos la...@protulae.com wrote: Hi Omer, That's not how its meant to work; the suggester is giving you potentially matching terms by looking at the set of terms for the given field across the index. Possibly you want to look at the MoreLikeThis component or handler? It will return matching documents, from which you have access to the fields you want. Regards, Lajos On 17/03/2014 14:05, omer sonmez wrote: I am using Solr 4.5.1 to suggest movies for my system. What i need solr to return not only the move_title but also the movie_id that belongs to the movie. As an example; this is kind of what i need:response lst name=responseHeader int name=status0/int int name=QTime1/int /lst lst name=spellcheck lst name=suggestions lst name=har int name=numFound6/int int name=startOffset0/int int name=endOffset3/int arr name=suggestion doc str name=name_autocompletehard eight (1996)/str str name=movie_id144/str /doc doc str name=name_autocompletehard rain (1998)/str str name=movie_id14/str /doc doc str name=name_autocompleteharlem (1993)/str str name=movie_id1044/str /doc /arr /lst /lst /lst /response My search component config is like :searchComponent name=suggest class=solr.SpellCheckComponent lst name=spellchecker str name=namesuggest/str str name=classnameorg.apache.solr.spelling.suggest.Suggester/str str name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookup/str str name=fieldname_autocomplete/str str name=spellcheck.onlyMorePopulartrue/str /lst /searchComponent My request hadler config is like:requestHandler name=/suggest class=org.apache.solr.handler.component.SearchHandler lst name=defaults str name=spellchecktrue/str str name=spellcheck.dictionarysuggest/str str name=spellcheck.count10/str /lst arr name=components strsuggest/str /arr /requestHandler and my shema config is like below:field name=movie_id type=string indexed=true stored=true multiValued=false required=true/ field name=movie_title type=text indexed=true stored=true multiValued=false / !--field name=name_auto type=text_auto indexed=true stored=true multiValued=false /-- field name=name_autocomplete type=text_auto indexed=true stored=true multiValued=false / copyField source=movie_title dest=name_autocomplete / how can i manage to get other fiels using suggester in solr 4.5.1? Thanks,
How to return more fields on Solr 4.5.1 Suggester?
I am using Solr 4.5.1 to suggest movies for my system. What i need solr to return not only the move_title but also the movie_id that belongs to the movie. As an example; this is kind of what i need:response lst name=responseHeader int name=status0/int int name=QTime1/int /lst lst name=spellcheck lst name=suggestions lst name=har int name=numFound6/int int name=startOffset0/int int name=endOffset3/int arr name=suggestion doc str name=name_autocompletehard eight (1996)/str str name=movie_id144/str /doc doc str name=name_autocompletehard rain (1998)/str str name=movie_id14/str /doc doc str name=name_autocompleteharlem (1993)/str str name=movie_id1044/str /doc /arr /lst /lst /lst /response My search component config is like :searchComponent name=suggest class=solr.SpellCheckComponent lst name=spellchecker str name=namesuggest/str str name=classnameorg.apache.solr.spelling.suggest.Suggester/str str name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookup/str str name=fieldname_autocomplete/str str name=spellcheck.onlyMorePopulartrue/str /lst /searchComponent My request hadler config is like:requestHandler name=/suggest class=org.apache.solr.handler.component.SearchHandler lst name=defaults str name=spellchecktrue/str str name=spellcheck.dictionarysuggest/str str name=spellcheck.count10/str /lst arr name=components strsuggest/str /arr /requestHandler and my shema config is like below:field name=movie_id type=string indexed=true stored=true multiValued=false required=true/ field name=movie_title type=text indexed=true stored=true multiValued=false / !--field name=name_auto type=text_auto indexed=true stored=true multiValued=false /-- field name=name_autocomplete type=text_auto indexed=true stored=true multiValued=false / copyField source=movie_title dest=name_autocomplete / how can i manage to get other fiels using suggester in solr 4.5.1? Thanks,
Re: How to return more fields on Solr 4.5.1 Suggester?
Hi Omer, That's not how its meant to work; the suggester is giving you potentially matching terms by looking at the set of terms for the given field across the index. Possibly you want to look at the MoreLikeThis component or handler? It will return matching documents, from which you have access to the fields you want. Regards, Lajos On 17/03/2014 14:05, omer sonmez wrote: I am using Solr 4.5.1 to suggest movies for my system. What i need solr to return not only the move_title but also the movie_id that belongs to the movie. As an example; this is kind of what i need:response lst name=responseHeader int name=status0/int int name=QTime1/int /lst lst name=spellcheck lst name=suggestions lst name=har int name=numFound6/int int name=startOffset0/int int name=endOffset3/int arr name=suggestion doc str name=name_autocompletehard eight (1996)/str str name=movie_id144/str /doc doc str name=name_autocompletehard rain (1998)/str str name=movie_id14/str /doc doc str name=name_autocompleteharlem (1993)/str str name=movie_id1044/str /doc /arr /lst /lst /lst /response My search component config is like :searchComponent name=suggest class=solr.SpellCheckComponent lst name=spellchecker str name=namesuggest/str str name=classnameorg.apache.solr.spelling.suggest.Suggester/str str name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookup/str str name=fieldname_autocomplete/str str name=spellcheck.onlyMorePopulartrue/str /lst /searchComponent My request hadler config is like:requestHandler name=/suggest class=org.apache.solr.handler.component.SearchHandler lst name=defaults str name=spellchecktrue/str str name=spellcheck.dictionarysuggest/str str name=spellcheck.count10/str /lst arr name=components strsuggest/str /arr /requestHandler and my shema config is like below:field name=movie_id type=string indexed=true stored=true multiValued=false required=true/ field name=movie_title type=text indexed=true stored=true multiValued=false / !--field name=name_auto type=text_auto indexed=true stored=true multiValued=false /-- field name=name_autocomplete type=text_auto indexed=true stored=true multiValued=false / copyField source=movie_title dest=name_autocomplete / how can i manage to get other fiels using suggester in solr 4.5.1? Thanks,
Re: How to return more fields on Solr 4.5.1 Suggester?
Perhaps index the concatenation of the two fields, something like this: hard rain (1998)!14 Then have the app layer peel off the !14 for displaying the title to the user. Then use the 14 however you need to. Best, Erick On Mon, Mar 17, 2014 at 6:28 AM, Lajos la...@protulae.com wrote: Hi Omer, That's not how its meant to work; the suggester is giving you potentially matching terms by looking at the set of terms for the given field across the index. Possibly you want to look at the MoreLikeThis component or handler? It will return matching documents, from which you have access to the fields you want. Regards, Lajos On 17/03/2014 14:05, omer sonmez wrote: I am using Solr 4.5.1 to suggest movies for my system. What i need solr to return not only the move_title but also the movie_id that belongs to the movie. As an example; this is kind of what i need:response lst name=responseHeader int name=status0/int int name=QTime1/int /lst lst name=spellcheck lst name=suggestions lst name=har int name=numFound6/int int name=startOffset0/int int name=endOffset3/int arr name=suggestion doc str name=name_autocompletehard eight (1996)/str str name=movie_id144/str /doc doc str name=name_autocompletehard rain (1998)/str str name=movie_id14/str /doc doc str name=name_autocompleteharlem (1993)/str str name=movie_id1044/str /doc /arr /lst /lst /lst /response My search component config is like :searchComponent name=suggest class=solr.SpellCheckComponent lst name=spellchecker str name=namesuggest/str str name=classnameorg.apache.solr.spelling.suggest.Suggester/str str name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookup/str str name=fieldname_autocomplete/str str name=spellcheck.onlyMorePopulartrue/str /lst /searchComponent My request hadler config is like:requestHandler name=/suggest class=org.apache.solr.handler.component.SearchHandler lst name=defaults str name=spellchecktrue/str str name=spellcheck.dictionarysuggest/str str name=spellcheck.count10/str /lst arr name=components strsuggest/str /arr /requestHandler and my shema config is like below:field name=movie_id type=string indexed=true stored=true multiValued=false required=true/ field name=movie_title type=text indexed=true stored=true multiValued=false / !--field name=name_auto type=text_auto indexed=true stored=true multiValued=false /-- field name=name_autocomplete type=text_auto indexed=true stored=true multiValued=false / copyField source=movie_title dest=name_autocomplete / how can i manage to get other fiels using suggester in solr 4.5.1? Thanks,