lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emir Arnautovic <emir.arnauto...@sematext.com>
Subject Re: ngrams with position
Date Tue, 08 Mar 2016 09:24:15 GMT
Hi Elisabeth,
I don't think there is such token filter, so you would have to create 
your own token filter that takes token and emits ngram token of specific 
length. It should not be too hard to create such filter - you can take a 
look how nagram filter is coded - yours should be simpler than that.

Regards,
Emir

On 08.03.2016 08:52, elisabeth benoit wrote:
> Hello,
>
> I'm using solr 4.10.1. I'd like to index words with ngrams of fix lenght
> with a position in the end.
>
> For instance, with fix lenght 3, Amsterdam would be something like:
>
>
> a0 (two spaces added at beginning)
> am1
> ams2
> mst3
> ste4
> ter5
> erd6
> rda7
> dam8
> am9 (one more space in the end)
>
> The number at the end being the position.
>
> Does anyone have a clue how to achieve this?
>
> Best regards,
> Elisabeth
>

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


Mime
View raw message