idanhagai
(Idan Hagai)
April 26, 2017, 7:01am
1
Hi all,
I have multiple fields with different analyzers:
text_english , text_spanish , text_french , etc..
I'm executing the follow query string:
{
"query": {
"query_string": {
"fields": [
"text_*"
],
"query": "bla bla bla"
}
}
}
I have another field (NO INDEX) with the same name pattern text_full that cause the following error:
java.lang.IllegalArgumentException: Cannot search on field [text_full] since it is not indexed.
Is there any way to exclude that field in query / to suppress this exception ?
dadoonet
(David Pilato)
April 26, 2017, 7:28am
2
Would may be better to use copy_to
feature and copy whatever you want to index in something like full.text
so it won't conflict.
What is this text_full
field BTW? What is the mapping?
idanhagai
(Idan Hagai)
April 26, 2017, 8:13am
3
"text_spanish":{
"type":"text",
"analyzer": "MY_SPANISH_ANALYZER",
"term_vector":"with_positions_offsets"
},
"text_full":{
"type":"keyword",
"index":"false"
}
text_spanish is a analyzed snippet from the text
dadoonet
(David Pilato)
April 26, 2017, 8:45am
4
Why you don't index text_full? I'm trying to understand your use case.
idanhagai
(Idan Hagai)
April 26, 2017, 8:47am
5
I need to analyzed only the snippet and also search only in the analyzed snippet.
Search in the text_full can retrieve irrelevant results for me.
system
(system)
Closed
May 24, 2017, 8:50am
6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.