I was starting to notice wrong results and I noticed something very weird.
This thing fails:
def test_find_word_to(self):
query = pyes.StringQuery('to', search_fields='name')
self.assertEqual(search(query).total, 1)
After I'm manually pushing something in a fresh index with a name "to", how
is that possible?
Some words are not handled in the same way?
{'name': 'to',
'created_datetime': '2012-01-14T13:11:47Z',
'doc_type': 'User',
'ideas': range(20),
'description': 'find me'},
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
query = pyes.StringQuery('to', search_fields='name')
self.assertEqual(search(query).total, 1)
'to' is a stopword, which is removed.
you can setup an analyzer which doesn't remove stopwords.
have a look at the section on analysis:
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
clint
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
I tried for example also with the 'english' analyzer but still the same...
So is there anywhere the list of stop words?
2013/2/7 Clinton Gormley clint@traveljury.com :
query = pyes.StringQuery('to', search_fields='name')
self.assertEqual(search(query).total, 1)
'to' is a stopword, which is removed.
you can setup an analyzer which doesn't remove stopwords.
have a look at the section on analysis:
Elasticsearch Platform — Find real-time answers at scale | Elastic
clint
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
dadoonet
(David Pilato)
February 7, 2013, 12:47pm
4
"to" is an english word!
Look here: http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/core/StopAnalyzer.java
If you don't want stop words, use a Simple analyzer or build your own analyzer using custom analyzer.
See: Elasticsearch Platform — Find real-time answers at scale | Elastic
and: Elasticsearch Platform — Find real-time answers at scale | Elastic
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs
Le 7 févr. 2013 à 13:20, andrea crotti andrea.crotti.0@gmail.com a écrit :
I tried for example also with the 'english' analyzer but still the same...
So is there anywhere the list of stop words?
2013/2/7 Clinton Gormley clint@traveljury.com :
query = pyes.StringQuery('to', search_fields='name')
self.assertEqual(search(query).total, 1)
'to' is a stopword, which is removed.
you can setup an analyzer which doesn't remove stopwords.
have a look at the section on analysis:
Elasticsearch Platform — Find real-time answers at scale | Elastic
clint
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .