Some words not analyzed?

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:
http://www.elasticsearch.org/guide/reference/index-modules/analysis/

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:
http://www.elasticsearch.org/guide/reference/index-modules/analysis/

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.

"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: http://www.elasticsearch.org/guide/reference/index-modules/analysis/simple-analyzer.html
and: http://www.elasticsearch.org/guide/reference/index-modules/analysis/custom-analyzer.html

--
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:
http://www.elasticsearch.org/guide/reference/index-modules/analysis/

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.