lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Raja Martinez <doblee...@estudiowebs.com>
Subject Re: Search on many indexes at once
Date Sat, 04 Mar 2006 04:30:32 GMT
Thanks Chris I'll provably try passing the MultiSearcher instance as a 
parameter so that I can use subDoc and so.
It makes sense though to have a getIndex() method inside hit or document
that returns some information about where that hit or document belongs 
to. Do you think that is reasonable to file a JIRA petition for this, 
I'm new to Lucene and I don't know what are the policies around these 
matters.


Chris Hostetter wrote:
> : 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?
> 
> As i understand it (like i said: i've never used these methods) the doc id
> returned by Hits.id() is what you pass to subSearcher to find out which
> index it came from.
> 
> : I'm on a SearchResults component that takes a Hits object as parameter
> : and the search is actually performed by other component.
> 
> It sounds like the API you are working with abstracts away the
> MultiSearcher so you don't have access to it once you get the Hits object.
> I think that makes it just about impossible to get the info you want.
> 
> I guess you either need to add a "doctype" field to all of the indexes, or
> deduce the doctype based on what fields are in each doc, or change the API
> you are using to give you access to the info you need.
> 
> 
> -Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message