That makes sense, thank you for the clarification!

@[email protected] If you can, please build on your explanation as It 
sounds relevant. 
-----Original Message-----
From: Dave <[email protected]> 
Sent: Monday, December 2, 2019 7:38 PM
To: [email protected]
Cc: [email protected]
Subject: Re: Is it possible to have different Stop words depending on the value 
of a field?

It clarifies yes. You need new fields. In this case something like Address_us 
Address_uk And index and search them accordingly with different stopword files 
used in different field types, hence the copy field from “address” into as many 
new fields as needed

> On Dec 2, 2019, at 7:33 PM, <[email protected]> <[email protected]> wrote:
> 
> To clarify, a document would look like this : 
> 
> {
>  address: "123 main Street",
>  country : "US"
> }
> 
> What I'd like to do when I configure my index is to apply a set of different 
> stop words to the address field depending on the value of the country. For 
> example, something like this : 
> 
> If (country == US) -> File1
> Else If (country == UK) -> File2
> 
> Etc..
> 
> Hopefully, that clarifies.
> 
> -----Original Message-----
> From: Jörn Franke <[email protected]>
> Sent: Monday, December 2, 2019 3:25 PM
> To: [email protected]
> Subject: Re: Is it possible to have different Stop words depending on the 
> value of a field?
> 
> You can have different fields by country. I am not sure about your stop words 
> but if they are not occurring in the other languages then you have not a 
> problem. 
> On the other hand: it you need more than stop words (eg lemmatizing, 
> specialized way of tokenization etc) then you need a different field per 
> language. You don’t describe your full use case, but if you have different 
> fields for different language then your client application needs to handle 
> this (not difficult, but you have to be aware).
> Not sure if you need to search a given address in all languages or if you use 
> the language of the user etc.
> 
>> Am 02.12.2019 um 20:13 schrieb yeikel valdes <[email protected]>:
>> 
>> Hi,
>> 
>> 
>> I have an index that stores addresses from different countries.
>> 
>> 
>> As every country has different stop words, I was wondering if it is possible 
>> to apply a different set of stop words depending on the value of a field. 
>> 
>> 
>> Or do I need different indexes/do itnat the ETL step to accomplish this?
>> 
>> 
> 
> 


Reply via email to