Filter based on a truncated string of caharacters

Hello everybody
I need help regarding the filter.
I'd like to know if we can use a query based on a truncated string of characters.

In order to correctly use a specific filter I'm supposed to add the following term:
"D3_VNNO - NORIA,AR - Contrôle des Autorisations de Prêts,BJ - Gestion des créances mobilisables,P5 - ACREA – Gestion des Collatéraux,XP - PALMA - Système de Collecte et de Transformation des Données,VN_REFC - PRISME REFERENTIEL COMMUN,LK_CALC - Risques Bque Détail CR- Notation Bâle II" (Yes ! It's very long !)

So I'd like to know if a specific query exist for a truncated string of characters.
In my example it would allow me to add only "D3_VNNO" in the request

Thanks a lot

You could use the prefix query in ES for this specific case or the wildcard query.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-prefix-query.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html

Hello Marius,
Thanks for your help.
In addition to this request I'd like to know if we can mix it within a multiple Term query.

I know and daily use the query below
"query": {
"bool": {
"filter": {
"terms": {
"Identifiant": [
"xxxxxx",
"xxxxxx"
]
}
Is it possible to mix the prefix query and the request below ?
If yes do you know the correct syntax ?

Thanks a lot

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.