I run django (and Swish-E) under linux so I can't provide any advise on
how to compile it for windows.

I do run swish-e with the -S prog option and I wrote a python script
that reads all of the models from the database and writes out xml
(actually html) that corresponds with the values that I'm interested in
indexing.

This allows me to weight the various fields (eg title field is more
important that the description field)

Here's my entire indexing script (my database is a catalog of items for
an e-commerce store):

from cwood.store.models import *

import sys

def render(item):
    str = "<html>"
    str += '<head><META NAME="model"
CONTENT="items"><title>%s</title></head>'% item.name
    str += "<body>"
    str += "<p>%s</p>" % item.description
    str += "</body></html>"
    return str

def print_data(path, data):
    print "Path-Name: %s" % str(path)
    print "Content-Length: %d" % len(data)
    print "Document-Type: HTML*"
    print ""
    sys.stdout.write(data)

items = Item.objects.all()
for i in items:
    print_data(i.id, render(i))


Then I just run:
swish-e -S prog -i generate_index.py


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to