Re: Suggestions from different dictionaries dynamically

2017-03-15 Thread alessandro.benedetti
Hi Mesenthil,
Are you using the spellchecker for autocompletion purposes ?
In case you do, I would recommend to use the suggester component, way more
flexible and specifically designed for autocompletion [1] .

Related your requirement to see different categories of spellcheck
suggestions, I would recommend to use multiple dictionaries and not use a
common source field for the suggestions ( keep the school and professor
separate).

https://cwiki.apache.org/confluence/display/solr/Spell+Checking#SpellChecking-Thespellcheck.dictionaryParameter

At query time depending on the use case you can use one dictionary or the
other.

Cheers





[1]  http://alexbenedetti.blogspot.co.uk/2015/07/solr-you-complete-me.html ,
https://lucidworks.com/2015/03/04/solr-suggester/



-
---
Alessandro Benedetti
Search Consultant, R Software Engineer, Director
Sease Ltd. - www.sease.io
--
View this message in context: 
http://lucene.472066.n3.nabble.com/Suggestions-from-different-dictionaries-dynamically-tp4324864p4325083.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Suggestions from different dictionaries dynamically

2017-03-15 Thread mesenthil1
Yes we are using spellcheck dictionary.  Our default search field is "text".
Following is the solrconfig snippet. Please let us know if there is more
information required.

  
 
   edismax
   true
 
 
  typeaheadspellcheck
  spellcheckresearcher  

  

  
  
typeaheadtextSpellPhrase


  spellchecker_phrase
  spellphrase
  ./spellchecker_phrase_typeahead






--
View this message in context: 
http://lucene.472066.n3.nabble.com/Suggestions-from-different-dictionaries-dynamically-tp4324864p4325046.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Suggestions from different dictionaries dynamically

2017-03-14 Thread Alexandre Rafalovitch
Are you actually using spell checker functionality? If so, could you
provide the solrconfig.xml segment of what that configuration looks
like.

Or are you just using plain search, then what is your default 'df' field?

Regards,
   Alex.

http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 14 March 2017 at 08:24, vuppalasubbarao <manikanta.v-scho...@hcl.com> wrote:
> Hi,
>
> We have two field names "teacher_field" and "school_field" along with other
> fields like "source". We have created single dictionary from both these
> fields.  When I am searching with misspelling of "teacher_field", I also get
> the spelling suggestions from "school_field". Instead I have to get
> suggestions only from schoolfield alone if I can pass additional filter
> field like "source".
>
> In this case, is there a possibility I can create two dictionaries and use
> one of them at query time based on my other query field[fq=source:"TEACHER"
> or fq=source:"COLLEGE" ].
>
> */SAMPLE DOCS:/*
> 
> 1
> michael
> newyork
> teacher
> 
> 
> 2
> rajan
> michigan
> school
> 
>
> /*QUERY:*/
> q=michial=source:teacher   ---> getting suggestion as "michigan". Instead
> I expect "michael"
>
> /*SCHEMA.XML*/
>  
>  
>
>
>
>
>
> Thanks,
> Subbarao
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Suggestions-from-different-dictionaries-dynamically-tp4324864.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Suggestions from different dictionaries dynamically

2017-03-14 Thread vuppalasubbarao
Hi,

We have two field names "teacher_field" and "school_field" along with other
fields like "source". We have created single dictionary from both these
fields.  When I am searching with misspelling of "teacher_field", I also get
the spelling suggestions from "school_field". Instead I have to get
suggestions only from schoolfield alone if I can pass additional filter
field like "source".  

In this case, is there a possibility I can create two dictionaries and use
one of them at query time based on my other query field[fq=source:"TEACHER"
or fq=source:"COLLEGE" ]. 

*/SAMPLE DOCS:/*

1 
michael
newyork
teacher


2 
rajan
michigan
school


/*QUERY:*/
q=michial=source:teacher   ---> getting suggestion as "michigan". Instead
I expect "michael"

/*SCHEMA.XML*/
 
 





Thanks,
Subbarao



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Suggestions-from-different-dictionaries-dynamically-tp4324864.html
Sent from the Solr - User mailing list archive at Nabble.com.