Re: Filter the Solr autosuggestion in Hybris
Please note: here we have autosuggestion with `SpellCheckComponent`, which we want to filter. Here is the question https://stackoverflow.com/questions/53707224/filter-the-solr-autosuggestion-in-hybris On Tue, 11 Dec 2018 at 17:02 Ankit Patel wrote: > I am trying to implement Solr context filtering to filter auto-suggestion > result based on the category value. > > *schema.xml* > > multiValued="true" /> > stored="true" multiValued="true" /> > multiValued="true" /> > > positionIncrementGap="100"> > > > > > > stored="true" multiValued="true" /> > positionIncrementGap="100"> > > > pattern="(['’])" replacement=" " /> > > words="lang/stopwords_en.txt" ignoreCase="true" /> > > synonyms="synonyms.txt"/> > /> > > > > > > multiValued="true" /> > > > *solrConfig.xml* > > > categorydic > org.apache.solr.spelling.suggest.Suggester > name="lookupImpl">org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory > name="dictionaryImpl">org.apache.solr.spelling.suggest.DocumentDictionaryFactory > autosuggest_en > allCategories_string_mv > false > false > text_spell_en > ${solr.core.dataDir}/suggesttest > > > fields look like > > "spellcheck_en": [ > "ANKITHI LIMIT", > "ROU7000272", > ] > > "allCategories_string_mv": [ > "3m", > "harddiskcategory", > ] > > > > http://localhost:8983/solr/master_Product/suggest?spellcheck=true=true=categorydic=json=mytest=harddiskcategory > > When I am hitting this URL with spellcheck.dictionary=categorydic, > spellcheck.cfq=harddiskcategory,spellcheck.q=mytest it won't filter the > result. I am getting all the match of *mytest* > > Solr Version: 5.3.0 > Hybris Vesion: 6.0 > > Any clue? > > Regards, > Ankit Patel >
Filter the Solr autosuggestion in Hybris
I am trying to implement Solr context filtering to filter auto-suggestion result based on the category value. *schema.xml* *solrConfig.xml* categorydic org.apache.solr.spelling.suggest.Suggester org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory org.apache.solr.spelling.suggest.DocumentDictionaryFactory autosuggest_en allCategories_string_mv false false text_spell_en ${solr.core.dataDir}/suggesttest fields look like "spellcheck_en": [ "ANKITHI LIMIT", "ROU7000272", ] "allCategories_string_mv": [ "3m", "harddiskcategory", ] http://localhost:8983/solr/master_Product/suggest?spellcheck=true=true=categorydic=json=mytest=harddiskcategory When I am hitting this URL with spellcheck.dictionary=categorydic, spellcheck.cfq=harddiskcategory,spellcheck.q=mytest it won't filter the result. I am getting all the match of *mytest* Solr Version: 5.3.0 Hybris Vesion: 6.0 Any clue? Regards, Ankit Patel
RE: autosuggestion indexing in a solr cluster
Using the solr collection/suggest?suggesttrue URL for populating the index. Regards, Deepak -Original Message- From: Deepak Udapudi [mailto:dudap...@delta.org] Sent: Friday, February 23, 2018 5:42 PM To: solr-user@lucene.apache.org Cc: Balakrishna Sudabathula <bsudabath...@delta.org>; Anupama Pullela <apull...@delta.org>; Segar Soundiramourthy <ssoundiramour...@delta.org> Subject: autosuggestion indexing in a solr cluster Hi all, We are using a Solr cluster. We have Solr configuration for auto-suggestions as shown below. Specialty specialty specialty AnalyzingInfixLookupFactory specialty_suggester_infix_dir DocumentDictionaryFactory specialty text_general true true 2 specialty_provider_suggestor_dictionary string true 5 Specialty suggest We are using the URL "http://aw-lx0092:8984/solr/provider_collection_deepak/suggest?suggesttrue; to build the index. We see that the index that is built for auto-suggestions is not propagated to other solr instances in the cluster. Need auto suggestions indices to propagate to all the solr instances automatically. So, request for suggestions/solutions for the same. Thanks, Deepak The information contained in this email message and any attachments is confidential and intended only for the addressee(s). If you are not an addressee, you may not copy or disclose the information, or act upon it, and you should delete it entirely from your email system. Please notify the sender that you received this email in error. The information contained in this email message and any attachments is confidential and intended only for the addressee(s). If you are not an addressee, you may not copy or disclose the information, or act upon it, and you should delete it entirely from your email system. Please notify the sender that you received this email in error.
autosuggestion indexing in a solr cluster
Hi all, We are using a Solr cluster. We have Solr configuration for auto-suggestions as shown below. Specialty specialty specialty AnalyzingInfixLookupFactory specialty_suggester_infix_dir DocumentDictionaryFactory specialty text_general true true 2 specialty_provider_suggestor_dictionary string true 5 Specialty suggest We are using the URL "http://aw-lx0092:8984/solr/provider_collection_deepak/suggest?suggest=true=true; to build the index. We see that the index that is built for auto-suggestions is not propagated to other solr instances in the cluster. Need auto suggestions indices to propagate to all the solr instances automatically. So, request for suggestions/solutions for the same. Thanks, Deepak The information contained in this email message and any attachments is confidential and intended only for the addressee(s). If you are not an addressee, you may not copy or disclose the information, or act upon it, and you should delete it entirely from your email system. Please notify the sender that you received this email in error.
Re: Using Context field unable to get autosuggestion for zip code having '-'.
With that configuration you want to auto suggest Office names filtering them by zip code. Not sure why you perform an ngram analysis though. How do you want to filter by zip code ? Exact Search ? Edge ngram ? Regards - --- Alessandro Benedetti Search Consultant, R Software Engineer, Director Sease Ltd. - www.sease.io -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Using Context field unable to get autosuggestion for zip code having '-'.
Hi Team, Problem: Unable to get autosuggestion for zip code having '-'. We are using the context field as part of autosuggestion search. when we try with context search, we are not getting results for zip code having '-', ex:"92240-3064". Hence we did following the change in manager-schema and solrConfig In Managed-scheme this changes we are added. Created copy field for Zip code in managed-scheme Added this line for suggester in solrconfig.xml zip-autosuggest sample example: OfficeName officeName practiceLocationNumber zip-autosuggest AnalyzingInfixLookupFactory officeName_suggester_infix_dir DocumentDictionaryFactory practiceLocationNumber lowercase officeName_provider_suggestor_dictionary string we ran the reindexing without reloaded data. we are not getting the suggestion for zip code having "-". can you please suggest the solution for it. Thanks Nareshkumar ::DISCLAIMER:: -- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects. --
Re: Autosuggestion
Hello So, from what I've picked up so far: FST only matches from the beginning of the input, but can handle spelling errors and do stemming. AnalyzingInfix can't handle spelling errors or stemming but can match from the middle of the string. (Is there anyway to achieve both of the functionalities above, if need be?) Performance-wise, FST's are faster and more compact? Thanks On Thu, Apr 13, 2017 at 7:57 PM, Erick Ericksonwrote: > bq: FST-based vs AnalyzingInfix > > They are two totally different things. FST-based suggesters are very > fast and compact. But they only match from the beginning of the input. > > AnalyzingInfix creates a "sidecar" index that's searched like a normal > index and the _field_ is returned. Thus analyzinginfix can suggest > "my dog has fleas" when entering "fleas", but the FST-based suggesters > cannot. > > Best, > Erick > > On Thu, Apr 13, 2017 at 6:24 AM, OTH wrote: > > Thanks, that's very helpful! > > The third link especially is quite helpful. > > Is there any recommendation regarding using FST-based vs AnalyzingInfix > > suggesters? > > Thanks > > > > On Wed, Apr 12, 2017 at 6:23 PM, Andrea Gazzarini > wrote: > > > >> Hi, > >> I think you got an old post. I would have a look at the built-in > feature, > >> first. These posts can help you to get a quick overview: > >> > >> https://cwiki.apache.org/confluence/display/solr/Suggester > >> http://alexbenedetti.blogspot.it/2015/07/solr-you-complete-me.html > >> https://lucidworks.com/2015/03/04/solr-suggester/ > >> > >> HTH, > >> Andrea > >> > >> > >> On 12/04/17 14:43, OTH wrote: > >> > >>> Hello, > >>> > >>> Is there any recommended way to achieve auto-suggestion in textboxes > using > >>> Solr? > >>> > >>> I'm new to Solr, but right now I have achieved this functionality by > using > >>> an example I found online, doing this: > >>> > >>> I added a copy field, which is of the following type: > >>> > >>> >>> positionIncrementGap="100"> > >>> > >>> >>> maxGramSize="10"/> > >>> > >>> > >>> > >>> minGramSize="2" > >>> maxGramSize="10"/> > >>> > >>> > >>> > >>> > >>> In the search box, after each character is typed, the above field is > >>> queried, and the results are shown in a drop-down list. > >>> > >>> However, this is performing quite slow. I'm not sure if that has to do > >>> with the front-end code, or because I'm not using the recommended > approach > >>> in terms of how I'm using Solr. Is there any other recommended way to > use > >>> Solr to achieve this functionality? > >>> > >>> Thanks > >>> > >>> > >> >
Re: Autosuggestion
bq: FST-based vs AnalyzingInfix They are two totally different things. FST-based suggesters are very fast and compact. But they only match from the beginning of the input. AnalyzingInfix creates a "sidecar" index that's searched like a normal index and the _field_ is returned. Thus analyzinginfix can suggest "my dog has fleas" when entering "fleas", but the FST-based suggesters cannot. Best, Erick On Thu, Apr 13, 2017 at 6:24 AM, OTHwrote: > Thanks, that's very helpful! > The third link especially is quite helpful. > Is there any recommendation regarding using FST-based vs AnalyzingInfix > suggesters? > Thanks > > On Wed, Apr 12, 2017 at 6:23 PM, Andrea Gazzarini wrote: > >> Hi, >> I think you got an old post. I would have a look at the built-in feature, >> first. These posts can help you to get a quick overview: >> >> https://cwiki.apache.org/confluence/display/solr/Suggester >> http://alexbenedetti.blogspot.it/2015/07/solr-you-complete-me.html >> https://lucidworks.com/2015/03/04/solr-suggester/ >> >> HTH, >> Andrea >> >> >> On 12/04/17 14:43, OTH wrote: >> >>> Hello, >>> >>> Is there any recommended way to achieve auto-suggestion in textboxes using >>> Solr? >>> >>> I'm new to Solr, but right now I have achieved this functionality by using >>> an example I found online, doing this: >>> >>> I added a copy field, which is of the following type: >>> >>>>> positionIncrementGap="100"> >>> >>>>> maxGramSize="10"/> >>> >>> >>> >>>>> maxGramSize="10"/> >>> >>> >>> >>> >>> In the search box, after each character is typed, the above field is >>> queried, and the results are shown in a drop-down list. >>> >>> However, this is performing quite slow. I'm not sure if that has to do >>> with the front-end code, or because I'm not using the recommended approach >>> in terms of how I'm using Solr. Is there any other recommended way to use >>> Solr to achieve this functionality? >>> >>> Thanks >>> >>> >>
Re: Autosuggestion
Thanks, that's very helpful! The third link especially is quite helpful. Is there any recommendation regarding using FST-based vs AnalyzingInfix suggesters? Thanks On Wed, Apr 12, 2017 at 6:23 PM, Andrea Gazzariniwrote: > Hi, > I think you got an old post. I would have a look at the built-in feature, > first. These posts can help you to get a quick overview: > > https://cwiki.apache.org/confluence/display/solr/Suggester > http://alexbenedetti.blogspot.it/2015/07/solr-you-complete-me.html > https://lucidworks.com/2015/03/04/solr-suggester/ > > HTH, > Andrea > > > On 12/04/17 14:43, OTH wrote: > >> Hello, >> >> Is there any recommended way to achieve auto-suggestion in textboxes using >> Solr? >> >> I'm new to Solr, but right now I have achieved this functionality by using >> an example I found online, doing this: >> >> I added a copy field, which is of the following type: >> >>> positionIncrementGap="100"> >> >>> maxGramSize="10"/> >> >> >> >>> maxGramSize="10"/> >> >> >> >> >> In the search box, after each character is typed, the above field is >> queried, and the results are shown in a drop-down list. >> >> However, this is performing quite slow. I'm not sure if that has to do >> with the front-end code, or because I'm not using the recommended approach >> in terms of how I'm using Solr. Is there any other recommended way to use >> Solr to achieve this functionality? >> >> Thanks >> >> >
Re: Autosuggestion
Hi, I think you got an old post. I would have a look at the built-in feature, first. These posts can help you to get a quick overview: https://cwiki.apache.org/confluence/display/solr/Suggester http://alexbenedetti.blogspot.it/2015/07/solr-you-complete-me.html https://lucidworks.com/2015/03/04/solr-suggester/ HTH, Andrea On 12/04/17 14:43, OTH wrote: Hello, Is there any recommended way to achieve auto-suggestion in textboxes using Solr? I'm new to Solr, but right now I have achieved this functionality by using an example I found online, doing this: I added a copy field, which is of the following type: In the search box, after each character is typed, the above field is queried, and the results are shown in a drop-down list. However, this is performing quite slow. I'm not sure if that has to do with the front-end code, or because I'm not using the recommended approach in terms of how I'm using Solr. Is there any other recommended way to use Solr to achieve this functionality? Thanks
Autosuggestion
Hello, Is there any recommended way to achieve auto-suggestion in textboxes using Solr? I'm new to Solr, but right now I have achieved this functionality by using an example I found online, doing this: I added a copy field, which is of the following type: In the search box, after each character is typed, the above field is queried, and the results are shown in a drop-down list. However, this is performing quite slow. I'm not sure if that has to do with the front-end code, or because I'm not using the recommended approach in terms of how I'm using Solr. Is there any other recommended way to use Solr to achieve this functionality? Thanks
Re: How to implement Autosuggestion
Hi Alessandro, Thanks for replying! Here are my answers inline. 1. "First of all, simple string autosuggestion or document autosuggestion ? ( with more additional field to show then the label) Document autosuggestions 2. Are you interested in the analysis for the text to suggest ? Fuzzy suggestions ? exact "beginning of the phrase" suggestions ? infix suggestions ?" --- I am interested in analysis for the text to suggest. 3. In the case you want to show the label AND the category AND whatever ( in Amazon style to make it simple) . A very straighforward solution is to model a specific Solr Field for your product collection. This field will contain the name of the product, analyzed according your need. Then your autosuggester will simply hit that field on each char typed, and you can show the entire document in the suggestions ( with all the fields you want) . Not sure what you mean by indexing a field with the name of product analyzed according to my need? Can you please give an example? Thanks again for taking time to respond to my query. On Thu, Apr 7, 2016 at 12:59 AM, chandan khatri <chandankhat...@gmail.com> wrote: > Hi Alessandro, > > Thanks for replying! > > Here are my answers inline. > > > > > On Mon, Apr 4, 2016 at 6:34 PM, Alessandro Benedetti < > abenede...@apache.org> wrote: > >> Hi Chandan, >> I will answer as my previous answer to a similar topic that got lost : >> "First of all, simple string autosuggestion or document autosuggestion ? ( >> with more additional field to show then the label) >> Are you interested in the analysis for the text to suggest ? Fuzzy >> suggestions ? exact "beginning of the phrase" suggestions ? infix >> suggestions ?" >> >> If you need only the category *payloadField* should be what you need . >> I never used it as a feature but it is there [1] . >> As Reth suggested, at the moment Solr supports only one payloadField, >> ignoring the others ( code confirms this). >> >> In the case you want to show the label AND the category AND whatever ( in >> Amazon style to make it simple) . >> A very straighforward solution is to model a specific Solr Field for your >> product collection. >> This field will contain the name of the product, analyzed according your >> need. >> Then your autosuggester will simply hit that field on each char typed, and >> you can show the entire document in the suggestions ( with all the fields >> you want) . >> Or we take a look to the implementation and we contribute the support for >> multiple *payloadField*. >> >> Cheers >> >> [1] https://cwiki.apache.org/confluence/display/solr/Suggester >> >> On Sun, Apr 3, 2016 at 1:09 PM, Reth RM <reth.ik...@gmail.com> wrote: >> >> > There is a payload attribute but I'm not sure if this can be used for >> such >> > use case. Lets wait for others contributors to confirm. >> > Similar question posted here: >> > >> > >> http://stackoverflow.com/questions/32434186/solr-suggestion-with-multiple-payloads >> > . >> > >> > If its just a category that you need then the work around(although not >> > accurate one) that I can think of is to include the category value to >> the >> > same field with pipe separation and extract from it? >> > >> > On Sun, Apr 3, 2016 at 11:41 AM, chandan khatri < >> chandankhat...@gmail.com> >> > wrote: >> > >> > > Hi All, >> > > >> > > I've a query regarding autosuggestion. My use case is as below: >> > > >> > > 1. User enters product name (say Nokia) >> > > 2. I want suggestions along with the category with which the product >> > > belongs. (e.g Nokia belongs to "electronics" and "mobile" category) >> so I >> > > want suggestion like Nokia in electronics and Nokia in mobile. >> > > >> > > I am able to get the suggestions using the OOTB >> AnalyzingInFixSuggester >> > but >> > > not sure how I can get the category along with the suggestion(can this >> > > category be considered as facet of the suggestion??) >> > > >> > > Any help/pointer is highly appreciated. >> > > >> > > Thanks, >> > > Chandan >> > > >> > >> >> >> >> -- >> -- >> >> Benedetti Alessandro >> Visiting card : http://about.me/alessandro_benedetti >> >> "Tyger, tyger burning bright >> In the forests of the night, >> What immortal hand or eye >> Could frame thy fearful symmetry?" >> >> William Blake - Songs of Experience -1794 England >> > >
Re: How to implement Autosuggestion
Hi Alessandro, Thanks for replying! Here are my answers inline. On Mon, Apr 4, 2016 at 6:34 PM, Alessandro Benedetti <abenede...@apache.org> wrote: > Hi Chandan, > I will answer as my previous answer to a similar topic that got lost : > "First of all, simple string autosuggestion or document autosuggestion ? ( > with more additional field to show then the label) > Are you interested in the analysis for the text to suggest ? Fuzzy > suggestions ? exact "beginning of the phrase" suggestions ? infix > suggestions ?" > > If you need only the category *payloadField* should be what you need . > I never used it as a feature but it is there [1] . > As Reth suggested, at the moment Solr supports only one payloadField, > ignoring the others ( code confirms this). > > In the case you want to show the label AND the category AND whatever ( in > Amazon style to make it simple) . > A very straighforward solution is to model a specific Solr Field for your > product collection. > This field will contain the name of the product, analyzed according your > need. > Then your autosuggester will simply hit that field on each char typed, and > you can show the entire document in the suggestions ( with all the fields > you want) . > Or we take a look to the implementation and we contribute the support for > multiple *payloadField*. > > Cheers > > [1] https://cwiki.apache.org/confluence/display/solr/Suggester > > On Sun, Apr 3, 2016 at 1:09 PM, Reth RM <reth.ik...@gmail.com> wrote: > > > There is a payload attribute but I'm not sure if this can be used for > such > > use case. Lets wait for others contributors to confirm. > > Similar question posted here: > > > > > http://stackoverflow.com/questions/32434186/solr-suggestion-with-multiple-payloads > > . > > > > If its just a category that you need then the work around(although not > > accurate one) that I can think of is to include the category value to the > > same field with pipe separation and extract from it? > > > > On Sun, Apr 3, 2016 at 11:41 AM, chandan khatri < > chandankhat...@gmail.com> > > wrote: > > > > > Hi All, > > > > > > I've a query regarding autosuggestion. My use case is as below: > > > > > > 1. User enters product name (say Nokia) > > > 2. I want suggestions along with the category with which the product > > > belongs. (e.g Nokia belongs to "electronics" and "mobile" category) so > I > > > want suggestion like Nokia in electronics and Nokia in mobile. > > > > > > I am able to get the suggestions using the OOTB AnalyzingInFixSuggester > > but > > > not sure how I can get the category along with the suggestion(can this > > > category be considered as facet of the suggestion??) > > > > > > Any help/pointer is highly appreciated. > > > > > > Thanks, > > > Chandan > > > > > > > > > -- > -- > > Benedetti Alessandro > Visiting card : http://about.me/alessandro_benedetti > > "Tyger, tyger burning bright > In the forests of the night, > What immortal hand or eye > Could frame thy fearful symmetry?" > > William Blake - Songs of Experience -1794 England >
Re: How to implement Autosuggestion
Hi Chandan, I will answer as my previous answer to a similar topic that got lost : "First of all, simple string autosuggestion or document autosuggestion ? ( with more additional field to show then the label) Are you interested in the analysis for the text to suggest ? Fuzzy suggestions ? exact "beginning of the phrase" suggestions ? infix suggestions ?" If you need only the category *payloadField* should be what you need . I never used it as a feature but it is there [1] . As Reth suggested, at the moment Solr supports only one payloadField, ignoring the others ( code confirms this). In the case you want to show the label AND the category AND whatever ( in Amazon style to make it simple) . A very straighforward solution is to model a specific Solr Field for your product collection. This field will contain the name of the product, analyzed according your need. Then your autosuggester will simply hit that field on each char typed, and you can show the entire document in the suggestions ( with all the fields you want) . Or we take a look to the implementation and we contribute the support for multiple *payloadField*. Cheers [1] https://cwiki.apache.org/confluence/display/solr/Suggester On Sun, Apr 3, 2016 at 1:09 PM, Reth RM <reth.ik...@gmail.com> wrote: > There is a payload attribute but I'm not sure if this can be used for such > use case. Lets wait for others contributors to confirm. > Similar question posted here: > > http://stackoverflow.com/questions/32434186/solr-suggestion-with-multiple-payloads > . > > If its just a category that you need then the work around(although not > accurate one) that I can think of is to include the category value to the > same field with pipe separation and extract from it? > > On Sun, Apr 3, 2016 at 11:41 AM, chandan khatri <chandankhat...@gmail.com> > wrote: > > > Hi All, > > > > I've a query regarding autosuggestion. My use case is as below: > > > > 1. User enters product name (say Nokia) > > 2. I want suggestions along with the category with which the product > > belongs. (e.g Nokia belongs to "electronics" and "mobile" category) so I > > want suggestion like Nokia in electronics and Nokia in mobile. > > > > I am able to get the suggestions using the OOTB AnalyzingInFixSuggester > but > > not sure how I can get the category along with the suggestion(can this > > category be considered as facet of the suggestion??) > > > > Any help/pointer is highly appreciated. > > > > Thanks, > > Chandan > > > -- -- Benedetti Alessandro Visiting card : http://about.me/alessandro_benedetti "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England
Re: How to implement Autosuggestion
There is a payload attribute but I'm not sure if this can be used for such use case. Lets wait for others contributors to confirm. Similar question posted here: http://stackoverflow.com/questions/32434186/solr-suggestion-with-multiple-payloads . If its just a category that you need then the work around(although not accurate one) that I can think of is to include the category value to the same field with pipe separation and extract from it? On Sun, Apr 3, 2016 at 11:41 AM, chandan khatri <chandankhat...@gmail.com> wrote: > Hi All, > > I've a query regarding autosuggestion. My use case is as below: > > 1. User enters product name (say Nokia) > 2. I want suggestions along with the category with which the product > belongs. (e.g Nokia belongs to "electronics" and "mobile" category) so I > want suggestion like Nokia in electronics and Nokia in mobile. > > I am able to get the suggestions using the OOTB AnalyzingInFixSuggester but > not sure how I can get the category along with the suggestion(can this > category be considered as facet of the suggestion??) > > Any help/pointer is highly appreciated. > > Thanks, > Chandan >
How to implement Autosuggestion
Hi All, I've a query regarding autosuggestion. My use case is as below: 1. User enters product name (say Nokia) 2. I want suggestions along with the category with which the product belongs. (e.g Nokia belongs to "electronics" and "mobile" category) so I want suggestion like Nokia in electronics and Nokia in mobile. I am able to get the suggestions using the OOTB AnalyzingInFixSuggester but not sure how I can get the category along with the suggestion(can this category be considered as facet of the suggestion??) Any help/pointer is highly appreciated. Thanks, Chandan
Re: How to implement Autosuggestion
Hi All, I've similar query regarding autosuggestion. My use case is as below: 1. User enters product name (say Nokia) 2. I want suggestions along with the category with which the product belongs. (e.g Nokia belongs to "electronics" and "mobile" category) so I want suggestion like Nokia in electronics and Nokia in mobile. I am able to get the suggestions using the OOTB AnalyzingInFixSuggester but not sure how I can get the category along with the suggestion (can this category be considered as facet of the suggestion??) Any help/pointer is highly appreciated. Thanks, Chandan On Wed, Mar 30, 2016 at 1:37 PM, Alessandro Benedetti <abenede...@apache.org > wrote: > Hi Mugeesh, autocompletion world is not that simple as you would expect. > Which kind of auto suggestion are you interested in ? > > First of all, simple string autosuggestion or document autosuggestion ? ( > with more additional field to show then the label) > Are you interested in the analysis for the text to suggest ? Fuzzy > suggestions ? exact "beginning of the phrase" suggestions ? infix > suggestions ? > Try to give some example and we could help better . > There is a specific suggester component, so it is likely to be useful to > you, but let's try to discover more. > > Cheers > > On Mon, Mar 28, 2016 at 6:03 PM, Reth RM <reth.ik...@gmail.com> wrote: > > > Solr AnalyzingInfix suggester component: > > https://lucidworks.com/blog/2015/03/04/solr-suggester/ > > > > > > > > On Mon, Mar 28, 2016 at 7:57 PM, Mugeesh Husain <muge...@gmail.com> > wrote: > > > > > Hi, > > > > > > I am looking for the best way to implement autosuggestion in ecommerce > > > using solr or elasticsearch. > > > > > > I guess using ngram analyzer is not a good way if data is big. > > > > > > > > > Please suggest me any link or your opinion ? > > > > > > > > > > > > Thanks > > > Mugeesh > > > > > > > > > > > > -- > > > View this message in context: > > > > > > http://lucene.472066.n3.nabble.com/How-to-implement-Autosuggestion-tp4266434.html > > > Sent from the Solr - User mailing list archive at Nabble.com. > > > > > > > > > -- > -- > > Benedetti Alessandro > Visiting card : http://about.me/alessandro_benedetti > > "Tyger, tyger burning bright > In the forests of the night, > What immortal hand or eye > Could frame thy fearful symmetry?" > > William Blake - Songs of Experience -1794 England >
Re: How to implement Autosuggestion
Hi Mugeesh, autocompletion world is not that simple as you would expect. Which kind of auto suggestion are you interested in ? First of all, simple string autosuggestion or document autosuggestion ? ( with more additional field to show then the label) Are you interested in the analysis for the text to suggest ? Fuzzy suggestions ? exact "beginning of the phrase" suggestions ? infix suggestions ? Try to give some example and we could help better . There is a specific suggester component, so it is likely to be useful to you, but let's try to discover more. Cheers On Mon, Mar 28, 2016 at 6:03 PM, Reth RM <reth.ik...@gmail.com> wrote: > Solr AnalyzingInfix suggester component: > https://lucidworks.com/blog/2015/03/04/solr-suggester/ > > > > On Mon, Mar 28, 2016 at 7:57 PM, Mugeesh Husain <muge...@gmail.com> wrote: > > > Hi, > > > > I am looking for the best way to implement autosuggestion in ecommerce > > using solr or elasticsearch. > > > > I guess using ngram analyzer is not a good way if data is big. > > > > > > Please suggest me any link or your opinion ? > > > > > > > > Thanks > > Mugeesh > > > > > > > > -- > > View this message in context: > > > http://lucene.472066.n3.nabble.com/How-to-implement-Autosuggestion-tp4266434.html > > Sent from the Solr - User mailing list archive at Nabble.com. > > > -- -- Benedetti Alessandro Visiting card : http://about.me/alessandro_benedetti "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England
Re: How to implement Autosuggestion
Solr AnalyzingInfix suggester component: https://lucidworks.com/blog/2015/03/04/solr-suggester/ On Mon, Mar 28, 2016 at 7:57 PM, Mugeesh Husain <muge...@gmail.com> wrote: > Hi, > > I am looking for the best way to implement autosuggestion in ecommerce > using solr or elasticsearch. > > I guess using ngram analyzer is not a good way if data is big. > > > Please suggest me any link or your opinion ? > > > > Thanks > Mugeesh > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/How-to-implement-Autosuggestion-tp4266434.html > Sent from the Solr - User mailing list archive at Nabble.com. >
How to implement Autosuggestion
Hi, I am looking for the best way to implement autosuggestion in ecommerce using solr or elasticsearch. I guess using ngram analyzer is not a good way if data is big. Please suggest me any link or your opinion ? Thanks Mugeesh -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-implement-Autosuggestion-tp4266434.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Different options for autocomplete/autosuggestion
You have to tell us more information about what not right means. Please review: http://wiki.apache.org/solr/UsingMailingLists Best Erick On Wed, Jul 27, 2011 at 6:12 AM, scorpking lehoank1...@gmail.com wrote: HI Bell, i used autocomplete in solr 3.1. same this: searchComponent name=autocomplete class=solr.SpellCheckComponent lst name=spellchecker str name=nameautocomplete/str str name=classnameorg.apache.solr.spelling.suggest.Suggester/str str name=lookupImplorg.apache.solr.spelling.suggest.jaspell.JaspellLookup/s tr str name=fieldautocomplete/str str name=buildOnCommittrue/str /lst and i make following URL* http://solr.pl/en/2010/11/15/solr-and-autocomplete-part-2/* to index my data. and had a problem. with one word, it have done very good. But when i typed more two words, rerults return not right. I don't know why? Can any one know this problem? Thanks for your help. -- View this message in context: http://lucene.472066.n3.nabble.com/Different-options-for-autocomplete-autosuggestion-tp2678899p3203032.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Different options for autocomplete/autosuggestion
HI Bell, i used autocomplete in solr 3.1. same this: searchComponent name=autocomplete class=solr.SpellCheckComponent lst name=spellchecker str name=nameautocomplete/str str name=classnameorg.apache.solr.spelling.suggest.Suggester/str str name=lookupImplorg.apache.solr.spelling.suggest.jaspell.JaspellLookup/s tr str name=fieldautocomplete/str str name=buildOnCommittrue/str /lst and i make following URL* http://solr.pl/en/2010/11/15/solr-and-autocomplete-part-2/* to index my data. and had a problem. with one word, it have done very good. But when i typed more two words, rerults return not right. I don't know why? Can any one know this problem? Thanks for your help. -- View this message in context: http://lucene.472066.n3.nabble.com/Different-options-for-autocomplete-autosuggestion-tp2678899p3203032.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Different options for autocomplete/autosuggestion
One autosuggestion solution would be to query normal text fields. That way you have the whole feature set of Solr (like NGram filtered text for infix search or field queries to scope the search). If you also store the data of the text field you directly have the results to use as autosuggestions. Unfortunately in some applications (like ours) different documents often contain the same data for the same field. So this approach may return many duplications as search hits for exactly this field. If one could collapse the results by that field all duplications would be gone and you only distinct hits remain (what one would expect from autosuggestions). At least this is how I understood field collapsing. Kai -- View this message in context: http://lucene.472066.n3.nabble.com/Different-options-for-autocomplete-autosuggestion-tp2678899p2701055.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: Different options for autocomplete/autosuggestion
I take raw user search term data, 'collapse' it into a form where I have only unique terms, per store, ordered by frequency of searches over some time period. The suggestions are then grouped and presented with store breakouts. That sounds kind of like what this page is talking about here, but I could be using the wrong terminology: http://wiki.apache.org/solr/FieldCollapsing -Original Message- From: Otis Gospodnetic [mailto:otis_gospodne...@yahoo.com] Sent: Tuesday, March 15, 2011 9:00 PM To: solr-user@lucene.apache.org Subject: Re: Different options for autocomplete/autosuggestion Hi, I actually don't follow how field collapsing helps with autocompletion...? Over at http://search-lucene.com we eat our own autocomplete dog food: http://sematext.com/products/autocomplete/index.html . Tasty stuff. Otis Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch Lucene ecosystem search :: http://search-lucene.com/ - Original Message From: Kai Schlamp schl...@gmx.de To: solr-user@lucene.apache.org Sent: Mon, March 14, 2011 11:52:48 PM Subject: Re: Different options for autocomplete/autosuggestion @Robert: That sounds interesting and very flexible, but also like a lot of work. This approach also doesn't seem to allow querying Solr directly by using Ajax ... one of the big benefits in my opinion when using Solr. @Bill: There are some things I don't like about the Suggester component. It doesn't seem to allow infix searches (at least it is not mentioned in the Wiki or elsewhere). It also uses a separate index that has to be rebuild independently of the main index. And it doesn't support any filter queries. The Lucid Imagination blog also describes a further autosuggest approach (http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popu lar-queries-using-edgengrams/). The disadvantage here is that the source documents must have distinct fields (resp. the dih selects must provide distinct data). Otherwise duplications would come up in the Solr query result, cause of the document nature of Solr. In my opinion field collapsing seems to be most promising for a full featured autosuggestion solution. Unfortunately it is not available for Solr 1.4.x or 3.x (I tried patching those branches several times without success). 2011/3/15 Bill Bell billnb...@gmail.com: http://lucidworks.lucidimagination.com/display/LWEUG/Spell+Checking+and+ Aut omatic+Completion+of+User+Queries For Auto-Complete, find the following section in the solrconfig.xml file for the collection: !-- Auto-Complete component -- searchComponent name=autocomplete class=solr.SpellCheckComponent lst name=spellchecker str name=nameautocomplete/str str name=classnameorg.apache.solr.spelling.suggest.Suggester/str str name=lookupImplorg.apache.solr.spelling.suggest.jaspell.JaspellLookup /s tr str name=fieldautocomplete/str str name=buildOnCommittrue/str !-- str name=sourceLocationamerican-english/str -- /lst On 3/14/11 8:16 PM, Andy angelf...@yahoo.com wrote: Can you provide more details? Or a link? --- On Mon, 3/14/11, Bill Bell billnb...@gmail.com wrote: See how Lucid Enterprise does it... A bit differently. On 3/14/11 12:14 AM, Kai Schlamp kai.schl...@googlemail.com wrote: Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai -- Dr. med. Kai Schlamp Am Fort Elisabeth 17 55131 Mainz Germany Phone +49-177-7402778 Email: schl...@gmx.de
Re: Different options for autocomplete/autosuggestion
Hi, I actually don't follow how field collapsing helps with autocompletion...? Over at http://search-lucene.com we eat our own autocomplete dog food: http://sematext.com/products/autocomplete/index.html . Tasty stuff. Otis Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch Lucene ecosystem search :: http://search-lucene.com/ - Original Message From: Kai Schlamp schl...@gmx.de To: solr-user@lucene.apache.org Sent: Mon, March 14, 2011 11:52:48 PM Subject: Re: Different options for autocomplete/autosuggestion @Robert: That sounds interesting and very flexible, but also like a lot of work. This approach also doesn't seem to allow querying Solr directly by using Ajax ... one of the big benefits in my opinion when using Solr. @Bill: There are some things I don't like about the Suggester component. It doesn't seem to allow infix searches (at least it is not mentioned in the Wiki or elsewhere). It also uses a separate index that has to be rebuild independently of the main index. And it doesn't support any filter queries. The Lucid Imagination blog also describes a further autosuggest approach (http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/). The disadvantage here is that the source documents must have distinct fields (resp. the dih selects must provide distinct data). Otherwise duplications would come up in the Solr query result, cause of the document nature of Solr. In my opinion field collapsing seems to be most promising for a full featured autosuggestion solution. Unfortunately it is not available for Solr 1.4.x or 3.x (I tried patching those branches several times without success). 2011/3/15 Bill Bell billnb...@gmail.com: http://lucidworks.lucidimagination.com/display/LWEUG/Spell+Checking+and+Aut omatic+Completion+of+User+Queries For Auto-Complete, find the following section in the solrconfig.xml file for the collection: !-- Auto-Complete component -- searchComponent name=autocomplete class=solr.SpellCheckComponent lst name=spellchecker str name=nameautocomplete/str str name=classnameorg.apache.solr.spelling.suggest.Suggester/str str name=lookupImplorg.apache.solr.spelling.suggest.jaspell.JaspellLookup/s tr str name=fieldautocomplete/str str name=buildOnCommittrue/str !-- str name=sourceLocationamerican-english/str -- /lst On 3/14/11 8:16 PM, Andy angelf...@yahoo.com wrote: Can you provide more details? Or a link? --- On Mon, 3/14/11, Bill Bell billnb...@gmail.com wrote: See how Lucid Enterprise does it... A bit differently. On 3/14/11 12:14 AM, Kai Schlamp kai.schl...@googlemail.com wrote: Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai -- Dr. med. Kai Schlamp Am Fort Elisabeth 17 55131 Mainz Germany Phone +49-177-7402778 Email: schl...@gmx.de
Different options for autocomplete/autosuggestion
Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai
RE: Different options for autocomplete/autosuggestion
I like field collapsing because that way my suggestions gives phrase results (ie the suggestion starts with what the user has typed so far) and thus I limit suggestions to be in the order of the words typed. I think that looks better for our retail oriented site. I populate the index with previous user queries. I just put wildcards on the end of the collapsed version what the user has typed so far. It is very fast. I make suggestions for every keystroke as a user types in his query on our site. Hope that helps. -Original Message- From: Kai Schlamp [mailto:kai.schl...@googlemail.com] Sent: Sunday, March 13, 2011 11:14 PM To: solr-user@lucene.apache.org Subject: Different options for autocomplete/autosuggestion Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai
Re: Different options for autocomplete/autosuggestion
Robert, thanks for your answer. What Solr version do you use? 4.0? As mentioned in my other post here I tried to patch 1.4 for using field collapsing, but couldn't get it to work (compiled fine, but collapsed parameters seems to be completely ignored). 2011/3/14 Robert Petersen rober...@buy.com: I like field collapsing because that way my suggestions gives phrase results (ie the suggestion starts with what the user has typed so far) and thus I limit suggestions to be in the order of the words typed. I think that looks better for our retail oriented site. I populate the index with previous user queries. I just put wildcards on the end of the collapsed version what the user has typed so far. It is very fast. I make suggestions for every keystroke as a user types in his query on our site. Hope that helps. -Original Message- From: Kai Schlamp [mailto:kai.schl...@googlemail.com] Sent: Sunday, March 13, 2011 11:14 PM To: solr-user@lucene.apache.org Subject: Different options for autocomplete/autosuggestion Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai -- Dr. med. Kai Schlamp Am Fort Elisabeth 17 55131 Mainz Germany Phone +49-177-7402778 Email: schl...@gmx.de
RE: Different options for autocomplete/autosuggestion
I am doing this very differently. We are on solr 1.4.0 and I accomplish the collapsing in my wrapper layer. I have written a layer of code around SOLR, an indexer on one end and a search service wrapping solrs on the other end. I manually collapse the field in my code. I keep both a collapsed and uncollapsed version of the phrase in my index, the uncollapsed is the only one stored for retrieval btw. I do this on both ends so I have complete control here... works well! Different than a patch of course tho. -Original Message- From: kai.schl...@googlemail.com [mailto:kai.schl...@googlemail.com] On Behalf Of Kai Schlamp Sent: Monday, March 14, 2011 2:12 PM To: solr-user@lucene.apache.org Subject: Re: Different options for autocomplete/autosuggestion Robert, thanks for your answer. What Solr version do you use? 4.0? As mentioned in my other post here I tried to patch 1.4 for using field collapsing, but couldn't get it to work (compiled fine, but collapsed parameters seems to be completely ignored). 2011/3/14 Robert Petersen rober...@buy.com: I like field collapsing because that way my suggestions gives phrase results (ie the suggestion starts with what the user has typed so far) and thus I limit suggestions to be in the order of the words typed. I think that looks better for our retail oriented site. I populate the index with previous user queries. I just put wildcards on the end of the collapsed version what the user has typed so far. It is very fast. I make suggestions for every keystroke as a user types in his query on our site. Hope that helps. -Original Message- From: Kai Schlamp [mailto:kai.schl...@googlemail.com] Sent: Sunday, March 13, 2011 11:14 PM To: solr-user@lucene.apache.org Subject: Different options for autocomplete/autosuggestion Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai -- Dr. med. Kai Schlamp Am Fort Elisabeth 17 55131 Mainz Germany Phone +49-177-7402778 Email: schl...@gmx.de
RE: Different options for autocomplete/autosuggestion
Note that due to the 'raw' nature of my source data I also have to heavily filter my data before collapsing it also. I don't want to suggest garbage phrases just because a lot of people searched on them. We store auxiliary data in the index for filtering on to perform the grouping. -Original Message- From: Robert Petersen [mailto:rober...@buy.com] Sent: Monday, March 14, 2011 4:25 PM To: solr-user@lucene.apache.org Subject: RE: Different options for autocomplete/autosuggestion I am doing this very differently. We are on solr 1.4.0 and I accomplish the collapsing in my wrapper layer. I have written a layer of code around SOLR, an indexer on one end and a search service wrapping solrs on the other end. I manually collapse the field in my code. I keep both a collapsed and uncollapsed version of the phrase in my index, the uncollapsed is the only one stored for retrieval btw. I do this on both ends so I have complete control here... works well! Different than a patch of course tho. -Original Message- From: kai.schl...@googlemail.com [mailto:kai.schl...@googlemail.com] On Behalf Of Kai Schlamp Sent: Monday, March 14, 2011 2:12 PM To: solr-user@lucene.apache.org Subject: Re: Different options for autocomplete/autosuggestion Robert, thanks for your answer. What Solr version do you use? 4.0? As mentioned in my other post here I tried to patch 1.4 for using field collapsing, but couldn't get it to work (compiled fine, but collapsed parameters seems to be completely ignored). 2011/3/14 Robert Petersen rober...@buy.com: I like field collapsing because that way my suggestions gives phrase results (ie the suggestion starts with what the user has typed so far) and thus I limit suggestions to be in the order of the words typed. I think that looks better for our retail oriented site. I populate the index with previous user queries. I just put wildcards on the end of the collapsed version what the user has typed so far. It is very fast. I make suggestions for every keystroke as a user types in his query on our site. Hope that helps. -Original Message- From: Kai Schlamp [mailto:kai.schl...@googlemail.com] Sent: Sunday, March 13, 2011 11:14 PM To: solr-user@lucene.apache.org Subject: Different options for autocomplete/autosuggestion Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai -- Dr. med. Kai Schlamp Am Fort Elisabeth 17 55131 Mainz Germany Phone +49-177-7402778 Email: schl...@gmx.de
Re: Different options for autocomplete/autosuggestion
See how Lucid Enterprise does it... A bit differently. On 3/14/11 12:14 AM, Kai Schlamp kai.schl...@googlemail.com wrote: Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai
Re: Different options for autocomplete/autosuggestion
Can you provide more details? Or a link? --- On Mon, 3/14/11, Bill Bell billnb...@gmail.com wrote: See how Lucid Enterprise does it... A bit differently. On 3/14/11 12:14 AM, Kai Schlamp kai.schl...@googlemail.com wrote: Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai
Re: Different options for autocomplete/autosuggestion
http://lucidworks.lucidimagination.com/display/LWEUG/Spell+Checking+and+Aut omatic+Completion+of+User+Queries For Auto-Complete, find the following section in the solrconfig.xml file for the collection: !-- Auto-Complete component -- searchComponent name=autocomplete class=solr.SpellCheckComponent lst name=spellchecker str name=nameautocomplete/str str name=classnameorg.apache.solr.spelling.suggest.Suggester/str str name=lookupImplorg.apache.solr.spelling.suggest.jaspell.JaspellLookup/s tr str name=fieldautocomplete/str str name=buildOnCommittrue/str !-- str name=sourceLocationamerican-english/str -- /lst On 3/14/11 8:16 PM, Andy angelf...@yahoo.com wrote: Can you provide more details? Or a link? --- On Mon, 3/14/11, Bill Bell billnb...@gmail.com wrote: See how Lucid Enterprise does it... A bit differently. On 3/14/11 12:14 AM, Kai Schlamp kai.schl...@googlemail.com wrote: Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai
Re: Different options for autocomplete/autosuggestion
@Robert: That sounds interesting and very flexible, but also like a lot of work. This approach also doesn't seem to allow querying Solr directly by using Ajax ... one of the big benefits in my opinion when using Solr. @Bill: There are some things I don't like about the Suggester component. It doesn't seem to allow infix searches (at least it is not mentioned in the Wiki or elsewhere). It also uses a separate index that has to be rebuild independently of the main index. And it doesn't support any filter queries. The Lucid Imagination blog also describes a further autosuggest approach (http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/). The disadvantage here is that the source documents must have distinct fields (resp. the dih selects must provide distinct data). Otherwise duplications would come up in the Solr query result, cause of the document nature of Solr. In my opinion field collapsing seems to be most promising for a full featured autosuggestion solution. Unfortunately it is not available for Solr 1.4.x or 3.x (I tried patching those branches several times without success). 2011/3/15 Bill Bell billnb...@gmail.com: http://lucidworks.lucidimagination.com/display/LWEUG/Spell+Checking+and+Aut omatic+Completion+of+User+Queries For Auto-Complete, find the following section in the solrconfig.xml file for the collection: !-- Auto-Complete component -- searchComponent name=autocomplete class=solr.SpellCheckComponent lst name=spellchecker str name=nameautocomplete/str str name=classnameorg.apache.solr.spelling.suggest.Suggester/str str name=lookupImplorg.apache.solr.spelling.suggest.jaspell.JaspellLookup/s tr str name=fieldautocomplete/str str name=buildOnCommittrue/str !-- str name=sourceLocationamerican-english/str -- /lst On 3/14/11 8:16 PM, Andy angelf...@yahoo.com wrote: Can you provide more details? Or a link? --- On Mon, 3/14/11, Bill Bell billnb...@gmail.com wrote: See how Lucid Enterprise does it... A bit differently. On 3/14/11 12:14 AM, Kai Schlamp kai.schl...@googlemail.com wrote: Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai -- Dr. med. Kai Schlamp Am Fort Elisabeth 17 55131 Mainz Germany Phone +49-177-7402778 Email: schl...@gmx.de