list(models_tests.doc.objects.exclude(pk__in=range(600) ).order_by("time_added").extra(where=["id is not null"] ).distinct().reverse()), ) if __name__ == "__main__" : from django.conf import settings settings.SEARCH_STORAGE_PATH = settings.SEARCH_STORAGE_PATH + "_test" settings.SEARCH_STORAGE_TYPE = "ram" import core, pylucene import models as models_tests models_tests.add() models_tests.cleanup_docs(models_tests.doc_without_index) models_tests.insert_docs(5, model=models_tests.doc_without_index) unittest.main(testRunner=models_tests.SearcherTestRunner(verbosity=2)) """ Description ----------- ChangeLog ---------
set([i.pk for i in o]), set([i.pk for i in o_n]), ) if __name__ == "__main__": from django.conf import settings settings.SEARCH_STORAGE_PATH = settings.SEARCH_STORAGE_PATH + "_test" settings.DEBUG = False import core, pylucene import models as models_tests models_tests.add() models_tests.cleanup_docs(models_tests.doc_without_index) models_tests.insert_docs(5, model=models_tests.doc_without_index) unittest.main(testRunner=models_tests.SearcherTestRunner(verbosity=2)) """ Description ----------- ChangeLog --------- Usage -----
if __name__ == "__main__" : from django.conf import settings settings.SEARCH_STORAGE_PATH = settings.SEARCH_STORAGE_PATH + "_test" settings.SEARCH_STORAGE_TYPE = "fs" settings.DEBUG = False from django.db.models import Q import core import models as models_tests models_tests.add() models_tests.cleanup_index() models_tests.cleanup_docs() models_tests.insert_docs(3) unittest.main(testRunner=models_tests.SearcherTestRunner(verbosity=2)) sys.exit() """ Description ----------- ChangeLog ---------
if __name__ == "__main__": from django.conf import settings settings.SEARCH_STORAGE_PATH = settings.SEARCH_STORAGE_PATH + "_tests" settings.SEARCH_STORAGE_TYPE = "fs" settings.DEBUG = False import core, pylucene, document import models as models_tests core.register_indexes(models_tests) models_tests.cleanup_index() models_tests.cleanup_docs() models_tests.insert_docs(1) unittest.main(testRunner=models_tests.SearcherTestRunner(verbosity=2)) sys.exit() """ Description ----------- ChangeLog --------- Usage -----