Home:ALL Converter>How to index string with underscore in Django with Haystack/Whoosh

How to index string with underscore in Django with Haystack/Whoosh

Ask Time:2014-03-21T20:41:18         Author:user1499532

Json Formatter

I am trying to implement search with Haystack and Whoosh in a Django project.

The CharField I am trying to index has data like something_like_this. But it won't show up in the search result if I search for 'something' or 'this. It only works if I search for 'something_like_this'. Is there anyway to search the keywords in the CharFiled?

All I can think of is to create another CharField, store the string without underscore of the original string and then index it. But that seems like stupid idea.

Author:user1499532,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/22559085/how-to-index-string-with-underscore-in-django-with-haystack-whoosh
yy