Skip to content

Commit

Permalink
lib.searchify > searchify
Browse files Browse the repository at this point in the history
gitignore some more stuff
  • Loading branch information
jaylett committed Dec 13, 2011
1 parent 983b280 commit b3396ca
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.pyc
*~
._*
4 changes: 2 additions & 2 deletions searchify/clients/pyes_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import copy
from django.conf import settings
import lib.searchify
import searchify
import pyes
import pyes.exceptions

Expand Down Expand Up @@ -399,7 +399,7 @@ def __len__(self):
def results(self):
for hit in self._hits:
pk = long(hit['_id'])
type = lib.searchify.utils.lookup_model(hit.get('_type'))
type = searchify.utils.lookup_model(hit.get('_type'))
if type is None:
raise Exception("Model %s not found" % hit.get('_type'))
yield SearchResult(type, pk, hit.get('_score', 0), hit)
6 changes: 3 additions & 3 deletions searchify/management/commands/searchify_reindex.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.core.management.base import BaseCommand, CommandError
import lib.searchify
import searchify
from optparse import make_option

class Command(BaseCommand):
Expand Down Expand Up @@ -34,6 +34,6 @@ def handle(self, *args, **kwargs):
for anything that hasn't been indexed yet.
"""

lib.searchify.autodiscover(ensure_dbs_exist=False)
searchify.autodiscover(ensure_dbs_exist=False)
self.validate()
lib.searchify.reindex(args)
searchify.reindex(args)
8 changes: 4 additions & 4 deletions searchify/management/commands/searchify_show.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.core.management.base import BaseCommand, CommandError
import lib.searchify
import searchify
from optparse import make_option
import pprint

Expand All @@ -12,8 +12,8 @@ class Command(BaseCommand):
""".strip()

def show_config(self, indices, verbose_out):
lib.searchify.autodiscover(verbose=verbose_out, ensure_dbs_exist=False)
index_models = lib.searchify.index._index_models
searchify.autodiscover(verbose=verbose_out, ensure_dbs_exist=False)
index_models = searchify.index._index_models
if not indices:
indices = index_models.keys()

Expand All @@ -22,7 +22,7 @@ def show_config(self, indices, verbose_out):
for model in index_models[indexname]:
self.stdout.write("From model: %s\n" % model)

indexer = lib.searchify.utils.get_indexer(model)
indexer = searchify.utils.get_indexer(model)
for field, config in sorted(indexer.get_configuration().items()):
self.stdout.write(" - %s:\n" % field)
for k, v in sorted(config.items()):
Expand Down

0 comments on commit b3396ca

Please sign in to comment.