lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emir Arnautović <emir.arnauto...@sematext.com>
Subject Re: Custom typeahead using Solr
Date Wed, 17 Oct 2018 10:29:32 GMT
Hi Vineet,
You can index your jobtitle field in two different ways:
1. standard tokenizer -> edge ngram
2. keyword tokenizer -> edge ngram

The first field will be used to match word regardless of its position and the second one to
prefer exact matches.

HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 17 Oct 2018, at 11:20, Vineet Mangla <vineet.mangla@bold.com> wrote:
> 
> Hi All,
> 
> We have a requirement to create typeahead using Solr with following logic:
> 
> Let's say my Solr core has a field called jobtitle with two values as
> "senior software engineer" and "software engineer"
> 
>   1. Now, if I search for "*sen*", result should be "*sen*ior software
>   engineer"
>   2.
> 
>   if I search for "*soft*", result should be in following order:
> 
>   "*soft*ware engineer"
> 
>   "senior *soft*ware engineer"
>   3. If I search for "*soft**ware eng*",result should be in following
>   order:   "*soft**ware eng*ineer"
> 
>   "senior *soft**ware eng*ineer"
> 
> Is there anyway we can achieve this functionality?
> 
> 
> Regards,
> Vineet Mangla


Mime
View raw message