Re: Filter the Solr autosuggestion in Hybris

2018-12-11 Thread Ankit Patel
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

2018-12-11 Thread Ankit Patel
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