stemming - Analyzer not added to field with Elasticsearch DSL -


i'm using elasticsearch-dsl-py 0.0.5 , example @ https://github.com/honzakral/es-django-example usage django.

i've got doctype:

class pagedoc(doctype):     title = string(analyzer='snowball')  index = index('my_index') index.doc_type(pagedoc) 

and update index using management command below. page django model i'm trying index.

class command(basecommand):     def handle(self, *args, **kwargs):         self.es = connections.get_connection()         index.delete(ignore=404)         index.create()         self.verbose_run(page)      def verbose_run(self, model, report_every=100):         name = model._meta.verbose_name         print('indexing %s: ' % name, end='')         start = time.time()         cnt = 0         _ in streaming_bulk(                 self.es,                 (m.to_search().to_dict(true) m in model.objects.all().iterator()),                 index=settings.es_index,                 doc_type=name.lower()):             cnt += 1             if cnt % report_every:                 print('.', end='')          print('done\nindexing %d %s in %.2f seconds' % (             cnt, name, time.time() - start         )) 

the (simplified) output of http://127.0.0.1:9200/my_index/_mapping?pretty is:

{   "my_index" : {     "mappings" : {       "page" : {         "properties" : {           "title" : {             "type" : "string"           }         }       }     }   } } 

i can query exact matches, stemming not working. why snowball analyzer not added title field?


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -