lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Raja Martinez <>
Subject Re: Search on many indexes at once
Date Sat, 04 Mar 2006 03:42:39 GMT
Hi Chris, thanks for the quick response,

It looks like I don't have access to the searcher.subSearcher or subDoc, 
since I get just a Hits object. Is it possible to know the Index folder 
based on a hit?

I'm on a SearchResults component that takes a Hits object as parameter 
and the search is actually performed by other component.

This is the method that performs the search:

public Hits searchMultipleIndexes(String query, IndexSearcher...searchers) {

  MultiSearcher searcher = new MultiSearcher(searchers);

  Query q = QueryParser.parse(query, "title", new StandardAnalyzer());



and later a iterate over the hits and I need to know if they belong to 
Categories, News etc... which all are different indexes.

any help appreciated.



Chris Hostetter wrote:
> : got this working, I just need to know how to get from a resulting hit
> : which index the hit belongs to. I have News, Channels, Categories and
> : Images as different Indexes and I need to link to one page or another
> : based on whether a hit belong to an index or not.
> take a look at subSearcher and subDoc.
> -Hoss

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message