Hi Sam,

You are right that if TurboLucne just returned the hits collection then your 
could just use the data from the index.  When I originally wrote that bit of 
code it was with the idea that I wanted to get back the actual model objects 
that match, not just the data.  It is an assumption, that could be removed to 
make things more flexible.

I suggest 2 things:

1) That we move this conversation over the the TurboLucene mailing list as it 
is not really a TurboGears issue,  I have CCed the TL list to start the 
thread over there.

2) That you open a ticket for this on the TurboLucene site and I will include 
the change in the next release.

In the mean time you can just edit/patch the turbolucene code and adjust your 
results_formatter accordingly.

Hope this helps.  It's nice to see people using TurboLucene in ways I did not 
think of.  It's certainly making me think! :)

Krys

On Saturday 2 June 2007 17:12, SamDonaldson wrote:
> Ok, I will.  I have a lot of questions on this and I really need to
> push forward with a more direct API.  I'll look into your code.
>
> One question:  Is it absolutely necessary to return results back as a
> query to get back the models?  I see this as a waste.  Why can't I
> return the data that I indexed.  Why am I have to hit the db in the IN
> list query to get all the models?  I'm assuming I could just return
> the results whichever way I want in results_formatter?
>
> Thanks,
> Sam
>
> On May 29, 4:45 am, Krys <[EMAIL PROTECTED]> wrote:
> > Hi Sam,
> >
> > I am the author ofTurboLucene. :)  All the source is in the
> > __init__.py.
> >
> > TL is still pretty young and evolving (albeit more slowly than I would
> > like.)  I do plan on breaking the out of __init__.py into separate
> > modules.  I also plan on providing some kind of full PyLucene access
> > at some point.  (I just personally do not need it.)
> >
> > The way I dealt with the threading issues is to have the main Python
> > loop create an indexer thread and a searcher factory thread (as
> > PythonThreads).  Then the API just sends messages through some
> > Queues.  It's convoluted, but I think it is better than trying to
> > monkey patch CherryPy.
> >
> > Anyway, hope this helps.  Why not join theTurboLucenemailing list?
> > That's probably the best place for TL-related questions, and I'd
> > certainly love to hear any thoughts/suggestions you have about TL use
> > and PyLucene use in general.
> >
> > Thanks,
> > Krys
> >
> > On May 28, 11:54 pm, SamDonaldson <[EMAIL PROTECTED]> wrote:
> > > Guys,
> > >
> > > I downloaded theturbolucenesource code, but I just don't see any of
> > > the files that have to do with the source?  How does Turblucene
> > > connect to pylucene?  Where's the code that takes care of the
> > > threadying issue in CherryPy?  I would love to be able to connect to
> > > pylucene directly without using another layer of API's provided by
> > >Turbolucene.  Can somebody help here?
> > >
> > > Thanks.
>
> 

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

Reply via email to