I was thinking of a default value, probably by Searcher, that is 'use lazy loading'.
For query specific "which fields to load", you are correct, there is no REAL choice but add new code, but I would think you would pass a list of field ids to the searcher that you wanted early loaded. But this could be easily done with a overloaded method that took the list of fields, with the original methods delegating and passing null (for all fields loading use the default Searcher method). Would this not be a simpler interface and require no changes to existing code? -----Original Message----- From: Grant Ingersoll [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 2:58 PM To: [email protected] Subject: Re: [jira] Commented: (LUCENE-609) Lazy field loading breaks backward compat I am not sure I see why it would require no changes? You would have to have some way to tell the FieldsReader you wanted a LazyDocument instead of a regular Document. Also, the desire was to have the ability to have some fields load as they do now while others are loaded when accessed. Robert Engels wrote: > Maybe I am missing something... > > Would it not be easier to just create a LazyDocument that extends > Document, and handles all of this transparently? It would also require > no changes to existing code. > > The code that currently returns a Document, can just return a > LazyDocument (if lazy/selective loading is enabled). > > -----Original Message----- > From: Yonik Seeley (JIRA) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 21, 2006 2:29 PM > To: [email protected] > Subject: [jira] Commented: (LUCENE-609) Lazy field loading breaks > backward compat > > [ > http://issues.apache.org/jira/browse/LUCENE-609?page=comments#action_1 > 241716 > 4 ] > > Yonik Seeley commented on LUCENE-609: > ------------------------------------- > > I just verified that Solr now compiles/works correctly again with this > patch. > Any objections to committing it? > > > >> Lazy field loading breaks backward compat >> ----------------------------------------- >> >> Key: LUCENE-609 >> URL: http://issues.apache.org/jira/browse/LUCENE-609 >> Project: Lucene - Java >> Type: Bug >> > > >> Components: Other >> Versions: 2.0.1 >> Reporter: Yonik Seeley >> Fix For: 2.0.1 >> Attachments: fieldable_patch.diff >> >> Document.getField() and Document.getFields() have changed in a non >> > backward compatible manner. > >> Simple code like the following no longer compiles: >> Field x = mydoc.getField("x"); >> > > -- > This message is automatically generated by JIRA. > - > If you think it was sent incorrectly contact one of the administrators: > http://issues.apache.org/jira/secure/Administrators.jspa > - > For more information on JIRA, see: > http://www.atlassian.com/software/jira > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- Grant Ingersoll Sr. Software Engineer Center for Natural Language Processing Syracuse University School of Information Studies 335 Hinds Hall Syracuse, NY 13244 http://www.cnlp.org Voice: 315-443-5484 Fax: 315-443-6886 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
