lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Search within multiple different subfolders
Date Wed, 21 Jun 2006 13:17:18 GMT
Shagheyegh:

I'm hardly the lucene expert, but I don't think you can search just a
portion of the index. But that's effectively what you're doing if you
restrict the search to "son and.....".

However, depending on your problem space, you could build separate indexes.
To continue the example, you could build 4 indexes, "mother", "father",
"son", "daughter" and only search the relevant ones.

You should still be able to aggregate the results. That is, you could search
over all 4 indexes when you needed to and combine the results into a single
response. Then you could only search a subset of them at other times. I
admit that I haven't yet had to use a MultiSearcher, but that sure looks
like what you want if you adopt this approach <G>...

Note: I'm looking at the 2.0 documentation....

But I also have to ask, why are you trying to "search only a portion of the
index"? If you haven't encountered a bottleneck that's forcing you into this
option (or don't have a *very* high expectation that you will encounter such
a bottleneck), this strikes me as work you shouldn't be doing until there's
a demonstrated need. The eXtreme Programming folks look at it this way "make
it work, make it right, make it fast".

>From Tony Hoare and Donald Knuth... "We should forget about small
efficiencies, say about 97% of the time: premature optimization is the root
of all evil."

Best
Erick

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message