[ https://issues.apache.org/jira/browse/LUCENE-1909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776997#action_12776997 ]
Grant Ingersoll edited comment on LUCENE-1909 at 11/12/09 1:49 PM: ------------------------------------------------------------------- Boy, I had an awesome use case when I wrote this up, but am forgetting it now. I think it was something like: If you are examining the index ahead of time, you could have heuristics about how much memory you want the system to use when loading a reader. Thus, I could have a clause in my IndexReader code that did something like: {code} if (index is big or memory is tight){ reader = IndexReader.open(..., largerTermsIndexDiv); } else{ reader = IndexReader.opent(..., DEFAULT_TERMS_INDEX_DIVISOR); } {code} Hard coding a 1 in that else clause seems like a bad thing to do given there is already a "default" value spec. by Lucene. Also, since it is package private, if I extend IndexReader, I won't have access to it. At the end of the day, it's not a big deal. was (Author: gsingers): Boy, I had an awesome use case when I wrote this up, but am forgetting it now. I think it was something like: If you are examining the index ahead of time, you could have heuristics about how much memory you want the system to use when loading a reader. Thus, I could have a clause in my IndexReader code that did something like: {code} if (index is big){ reader = IndexReader.open(..., largerTermsIndexDiv); } else{ reader = IndexReader.opent(..., DEFAULT_TERMS_INDEX_DIVISOR); } {code} Hard coding a 1 in that else clause seems like a bad thing to do given there is already a "default" value spec. by Lucene. Also, since it is package private, if I extend IndexReader, I won't have access to it. At the end of the day, it's not a big deal. > Make IndexReader.DEFAULT_TERMS_INDEX_DIVISOR public > --------------------------------------------------- > > Key: LUCENE-1909 > URL: https://issues.apache.org/jira/browse/LUCENE-1909 > Project: Lucene - Java > Issue Type: Improvement > Reporter: Grant Ingersoll > Assignee: Uwe Schindler > Priority: Trivial > Fix For: 3.0 > > Attachments: LUCENE_1909.patch > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org