Source

pycode / sourceindex / models.py

Full commit
from whoosh.index import create_in
from whoosh.fields import Schema, TEXT, ID, KEYWORD, NUMERIC


# for fulltext search in comments and doc-strings
comments_schema = Schema(
	filename=ID(stored=True), 
	comments=TEXT)


# for name search
name_schema = Schema(
	filename=ID(stored=True), 
    name=TEXT(stored=True), 
	kind=KEYWORD(stored=True), 
	scope=KEYWORD(stored=True), 
	line=NUMERIC(stored=True)
	)