Hi Gandham,

It seems to me that you need exact matches on singerName so it should be untokenized - use KeywordTokenizerFactory. If you want to make it case insensitive, add LowerCaseFilterFactory and that's for indexing.

Query analysis chain can use standard tokenizer, LowerCaseFilterFactory if want search to be case insensitive, and ShingleFilterFactory with shingles min to max number of name parts in singerName. Probably wrong assumption, but assuming FirstName LastName, you can use maxShingleSize=2 and in your first example it'll be: 'my fav', 'fav artist', 'artist justing', 'justin beiber'...

You can tweak this depending on other requirements.

HTH,
Emir


On 13.09.2016 23:27, Gandham, Satya wrote:
HI,

           I need help with defining a field ‘singerName’ with the right 
tokenizers and filters such that it gives me the below described behavior:

I have a few documents as given below:

Doc 1
       singerName: Justin Beiber
Doc 2:
       singerName: Justin Timberlake
…


Below is the list of quries and the corresponding matches:

Query 1: “My fav artist Justin Beiber is very impressive”
Docs Matched : Doc1

Query 2: “I have a Justin Timberlake poster on my wall”
Docs Matched: Doc2

Query 3: “The name Bieber Justin is unique”
Docs Matched: None

Query 4: “Timberlake is a lake of timber..?”
Docs Matched: None.

I have this described a bit more detailed here: 
http://stackoverflow.com/questions/39399321/solr-shingle-query-matching-keyword-tokenized-field

I’d appreciate any help in addressing this problem.

Thanks !!


--
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/

Reply via email to