Lee Mallabone wrote: > Okay, I'm now not entirely certain how useful a generic solution will be > to me, given the non-generic nature of the content I'm indexing. I think > there a lot of optomizations I can make that wouldn't be generic.
"Early optimization is the root of all evil." Seriously, though, one thing I see Doug say often is that lucene's indexing and searching are designed to be extremely fast. He often responds to questions about odd details - for example, the classic "do a search and cache the search results for paging across multiple web pages" - by saying to just use the brute force approach and rely on the speed of the lucene index. I like to say, I assume that there are people out there with a lot more on the ball than me about things like optimization. I try to use their brains as much as possible :-). For example, with compilers, I assume the compiler writer knew a lot more about optimization than I do. People talk about the compiler not having the human judgement to know what's best. That's true, but the way to deal with that is not to try to hand-optimize my code and outguess the compiler (which will only will only confuse the compiler and prevent it from doing what it was designed to do). The compiler can best optimize the program if I focus on making it clear what my intent is, what the program is meant to do, in the structure of the code first. This leads to another optimization slogan that I remember reading - algorithmic optimization is much better than spot optimization. In other words, before you try to figure out a faster way to do something, figure out if you're doing the thing that accomplishes your true goal in the fastest way. And figure out how important that thing is in the grand scheme of things. Steven J. Owens [EMAIL PROTECTED]