How come this simple example doesn't work?

from pyes import *

conn = ES('127.0.0.1:9200')

def main():
conn.index({'text':'This is great!'},'text-index','doc',1)
conn.indices.refresh("text-index")
q1= TextQuery('text','This')
results = conn.search(q1,index='text-index',typename='doc')
for r in results:
print r;

if name == 'main':
main()

I'm flummoxed by this.

Any idea?

thanks.

--
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.

"this" is a stop word. Trying searching for the word "great" or changing
your analyzer to one that does not have the stop filter.

Cheers,

Ivan

On Wed, Oct 9, 2013 at 6:00 AM, project2501 darreng5150@gmail.com wrote:

from pyes import *

conn = ES('127.0.0.1:9200')

def main():
conn.index({'text':'This is great!'},'text-index','doc',1)
conn.indices.refresh("text-index")
q1= TextQuery('text','This')
results = conn.search(q1,index='text-index',typename='doc')
for r in results:
print r;

if name == 'main':
main()

I'm flummoxed by this.

Any idea?

thanks.

--
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.